Apache
Tags:
For security, you might wish to turn off the directory browsing capability on your Apache server. By doing so, you prevent users from browsing the directory structure in your web docs.
My basic httpd.conf had this entry:
<Directory "/u01/app/apache/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
which allows the user to browse the directory structure.
to turn directory browsing off, I added a "-" in front of Indexes after Options.
»
- Add new comment
- Read more
- 12524 reads
Tags:
In httpd.conf
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /roller/ http://hostname:8080/roller/
ProxyPassReverse /roller/ http://hostname:8080/roller/
ProxyPass /roller http://hostname:8080/
ProxyPassReverse /roller http://hostname:8080/
»
- Add new comment
- 4399 reads
Tags:
Password Protecting a file or directory in Apache
************************************************************************
changes to the httpd.conf file:
-------------------------------
Default: This disables the processing of .htaccess files for the system.
<Directory />
AllowOverride None
</Directory>
or for a specified directory:
<Directory /home/domain/public_html>
AllowOverride None
</Directory>
Change to and/or specify directory to protect:
»
- Add new comment
- Read more
- 4356 reads
Tags:
in httpd.conf:
### Section 3: Virtual Hosts
#
# Use name-based virtual hosting.
#
NameVirtualHost 192.168.1.122
Listen 192.168.1.122:80
#
# VirtualHost example:
#
<VirtualHost 192.168.1.122>
ServerName www.domain1.org
DocumentRoot /usr/local/apache2/domain1.org/htdocs
ServerAdmin admin@domain1.org
ErrorLog logs/domain1.error_log
CustomLog logs/domain1.access_log combined
</VirtualHost>
<VirtualHost 192.168.1.122>
ServerName www.domain2.net
DocumentRoot /usr/local/apache2/domain2.net/htdocs
»
- Add new comment
- Read more
- 4310 reads
Tags:
in httpd.conf, add: CustomLog "|/u01/app/apache/bin/rotatelogs /u01/app/apache/logs/access_log.%Y%m%d 86400 -360" common (changing the path as needed...) where the number 86400 is seconds to rotation (86400 is 24 hours) and -360 is minutes offset from UTC 0 (-360 is for US Central) and comment out any other line beginning with 'CustomLog' this will give you logs, rotated daily, named something like: access_log.20061101 access_log.20061102 access_log.20061103 ...so you don't have to stop the server to deal with gigantic log files...
»
- Add new comment
- 8427 reads
Tags:
common Apache httpd command line options
httpd -l # shows which modules were compiled into Apache httpd -V # shows compile settings httpd -v # shows version number httpd -t # verifies syntax for config files httpd -h # lists available option (help) httpd -M # lists loaded modules
»
- Add new comment
- 6507 reads
