I have one big server (temporary and some websites will be moved to several others at some point) where I installed all the tools I need for my project (Jira, Bamboo, etc.) and now I need to add one 'regular' website to the mix that instead of all the other websites already configured don't really need to be proxied by apache and can be served directly.
So to make it a bit more clear, I have Jira, bamboo and some other applications running on their standalone Tomcat for which apache is proxying the requests and I want to add a regular website to this configuration but when I add my vhost configuration all the websites go down.
Here are my configuration files :
apache2.conf :
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 denied </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
Sample config file for application behind tomcat standalone (There is 4 like that):
<VirtualHost *> ServerName jira.example.com # Put this in the main section of your configuration (or desired virtual host, if using Apache virtual hosts) ProxyRequests Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://example.com:8080/ ProxyPassReverse / http://example.com:8080/ <Location /> Order allow,deny Allow from all </Location> LogLevel info ErrorLog ${APACHE_LOG_DIR}/jira_error.log CustomLog ${APACHE_LOG_DIR}/jira_access.log combined </VirtualHost>
Config file for the new vHost (work in progress):
<VirtualHost *:80> ServerAdmin [email protected] ServerName testing.example.com DocumentRoot /var/atlassian/application-data/bamboo/xml-data/build-dir/DFWA-DFWAAT2-DEV CustomLog /var/log/apache2/testing/access.log combined ErrorLog /var/log/apache2/testing/error.log ProxyRequests Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://testing.exemple.com/ ProxyPassReverse / http://testing.exemple.com/ <Location /> Order allow,deny Allow from all require all granted </Location> </VirtualHost>
I also have a config file for phpmyadmin that I don't think is required to troubleshoot our problem here.
I changed several times the file for the new vhost wich resulted in different behavior :
I started with a small config file with not much in it (serveradmin, servername, documentroot and log config) but when I add the file no websites are available anymore with a 403 Forbidden error and nothing in error.log or access.log
I tried to add a directory directive like this :
<Directory "/var/atlassian/application-data/bamboo/xml-data/build-dir/DFWA-DFWAAT2-DEV"> Options FollowSymLinks Require all granted </Directory>
With this the new site is reachable but the other sites all redirectet to the new site.
I then tried the file posted above and with this one the requests stale when I tried to access the different websites and at some point they return a proxy error because of an invalid response (Error reading from remote server). And I have this in my error.log :
[mpm_prefork:error] [pid 20284] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
Changing the configuration of mpm_prefork doesn't do much though.
I don't have any idea what to do next. Any suggestions?