Last active
December 24, 2015 22:49
-
-
Save rdeguzman/6875793 to your computer and use it in GitHub Desktop.
Sample apache2.conf with multiple subdomains pointing to a php or rails. Note, these are includes in httpd.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Virtual host for our Blog, derivative of wordpress based on php. | |
<VirtualHost 192.168.4.11:80> | |
ServerAdmin [email protected] | |
ServerName blog.datalink.loc | |
ServerAlias blog.datalink.loc | |
DocumentRoot "/usr/local/datalink/blog" | |
<Directory "/usr/local/datalink/blog"> | |
Options FollowSymLinks Includes ExecCGI | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
DirectoryIndex index.php | |
</Directory> | |
php_flag engine On | |
php_flag register_globals Off | |
php_flag short_open_tag Off | |
php_flag display_errors On | |
php_flag display_startup_errors On | |
php_flag ignore_repeated_errors On | |
php_flag ignore_repeated_source On | |
php_value docref_root "/doc/php5/" | |
php_value docref_ext ".html" | |
CustomLog /var/log/httpd/blog.log combinedio | |
LogLevel warn | |
</VirtualHost> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ServerRoot "/usr/local" | |
.. | |
.. | |
.. | |
Include etc/apache22/Includes/*.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost 192.168.4.11:80> | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
ProxyRequests Off | |
ProxyPreserveHost On | |
ProxyPass / http://station.datalink.loc:8080/ | |
ProxyPassReverse / station.datalink.loc:8080/ | |
ServerName jira.datalink.loc | |
CustomLog /var/log/httpd/jira.log combinedio | |
LogLevel warn | |
</VirtualHost> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost 192.168.4.11:80> | |
ServerAdmin [email protected] | |
ServerName dfms.datalink.loc | |
ServerAlias dfms.datalink.loc | |
DocumentRoot "/usr/local/datalink/dfms-rails/current/public" | |
<Directory "/usr/local/datalink/dfms-rails/current/public"> | |
#Options Indexes MultiViews | |
AllowOverride None | |
Order allow,deny | |
Allow from all | |
</Directory> | |
CustomLog /var/log/httpd/dfms-access.log combinedio | |
LogLevel warn | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Redirect all requests to the maintenance page if present | |
RewriteCond %{REQUEST_URI} !\.(css|gif|jpg|png)$ | |
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f | |
RewriteCond %{SCRIPT_FILENAME} !maintenance.html | |
RewriteRule ^.*$ /system/maintenance.html [L] | |
</IfModule> | |
</VirtualHost> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost 192.168.4.11:443> | |
ServerAdmin [email protected] | |
ServerName dfms.datalink.loc | |
ServerAlias dfms.datalink.loc | |
DocumentRoot "/usr/local/datalink/dfms-rails/current/public" | |
<Directory "/usr/local/datalink/dfms-rails/current/public"> | |
#Options Indexes MultiViews | |
AllowOverride None | |
Order allow,deny | |
Allow from all | |
</Directory> | |
CustomLog /var/log/httpd/dfms-ssl-access.log combinedio | |
LogLevel warn | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Redirect all requests to the maintenance page if present | |
RewriteCond %{REQUEST_URI} !\.(css|gif|jpg|png)$ | |
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f | |
RewriteCond %{SCRIPT_FILENAME} !maintenance.html | |
RewriteRule ^.*$ /system/maintenance.html [L] | |
</IfModule> | |
SSLEngine on | |
SSLCertificateFile /usr/local/datalink/certs/dfms.datalink.loc.crt | |
SSLCertificateKeyFile /usr/local/datalink/certs/dfms.datalink.loc.key | |
#SSLCACertificateFile /usr/certs/cabundle.crt | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment