Skip to content

Instantly share code, notes, and snippets.

@mkeneqa
Last active March 24, 2020 02:04
Show Gist options
  • Save mkeneqa/fcc3a4df14896f99128bae406c3a6600 to your computer and use it in GitHub Desktop.
Save mkeneqa/fcc3a4df14896f99128bae406c3a6600 to your computer and use it in GitHub Desktop.

Apache Configuration Files for us with Vagrant

Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/frontend>
AllowOverride All
Require all granted
</Directory>
<Directory /var/www/frontend/public>
AllowOverride All
Require all granted
Allow from all
</Directory>
<Directory /var/www/backend>
AllowOverride All
Require all granted
</Directory>
<Directory /var/www/backend/public>
AllowOverride All
Require all granted
Allow from all
</Directory>
#<Directory /srv/>
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
<VirtualHost *:8090>
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/backend/public
Header set Access-Control-Allow-Origin "*"
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/frontend/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Listen 80
Listen 8090
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment