Some of my Apache works
1)fix for apache error 'Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using sso.linux.com for ServerName'
add below properties in /etc/httpd/conf/httpd.conf file
ServerName localhost
2)Disable default html index file
comment out all the lines in /etc/httpd/conf.d/welcome.conf
3) Directory Listening using virtual host and alias example
NameVirtualHost *:808
Alias /logs "/test"
<VirtualHost *:808>
<Directory /test>
Options Indexes FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
4)Apache Reverse proxy Configuration example
<VirtualHost *:8446>
SSLEngine On
SSLCertificateFile /home/apache/ssl_certs/server.crt
SSLCertificateKeyFile /home/apache/ssl_certs/server.key
ProxyPass /app01/ http://10.0.1.1:808/logs/
ProxyPassReverse /app01/ http://10.0.1.1:808/logs/
ProxyPass /app02/ http://10.0.1.2:808/logs/
ProxyPassReverse /app02/ http://10.0.1.2:808/logs/
</VirtualHost>
5) Apache 2.4 virtual host directory sharing config for ansible
http://localhost:81/opt/repo should work fine for file sharing
Listen 81
<VirtualHost *:81>
DocumentRoot "/"
<Directory "/opt/repo">
Options Indexes MultiViews FollowSymlinks
AllowOverride None
Require all granted
</Directory>
<Directory "/foo">
Options Indexes MultiViews FollowSymlinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
1)fix for apache error 'Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using sso.linux.com for ServerName'
add below properties in /etc/httpd/conf/httpd.conf file
ServerName localhost
2)Disable default html index file
comment out all the lines in /etc/httpd/conf.d/welcome.conf
3) Directory Listening using virtual host and alias example
NameVirtualHost *:808
Alias /logs "/test"
<VirtualHost *:808>
<Directory /test>
Options Indexes FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
4)Apache Reverse proxy Configuration example
<VirtualHost *:8446>
SSLEngine On
SSLCertificateFile /home/apache/ssl_certs/server.crt
SSLCertificateKeyFile /home/apache/ssl_certs/server.key
ProxyPass /app01/ http://10.0.1.1:808/logs/
ProxyPassReverse /app01/ http://10.0.1.1:808/logs/
ProxyPass /app02/ http://10.0.1.2:808/logs/
ProxyPassReverse /app02/ http://10.0.1.2:808/logs/
</VirtualHost>
5) Apache 2.4 virtual host directory sharing config for ansible
http://localhost:81/opt/repo should work fine for file sharing
Listen 81
<VirtualHost *:81>
DocumentRoot "/"
<Directory "/opt/repo">
Options Indexes MultiViews FollowSymlinks
AllowOverride None
Require all granted
</Directory>
<Directory "/foo">
Options Indexes MultiViews FollowSymlinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
No comments:
Post a Comment