Hey,
I'm using Apache2 as proxy and mongrel_cluster as server for my Rails applications. When I try to access it by typing in the url I get a
500 "Internal Server Error" but when try to locally access the website with "lynx http://localhost:8200" it works.
This is my config:
<Proxy balancer://sportfreundewitold_cluster>
BalancerMember http://127.0.0.1:8200
BalancerMember http://127.0.0.1:8201
</Proxy>
# httpd [example.org] dmn entry BEGIN.
<VirtualHost x.x.x.x:80>
<IfModule suexec_module>
SuexecUserGroup vu2025 vu2025
</IfModule>
ServerAdmin
[email protected]
DocumentRoot /var/www/virtual/example.org/htdocs/current/public
ServerName example.org
ServerAlias www.example.org example.org *.example.org vu2025.admin.roughneck-media.de
Alias /errors /var/www/virtual/example.org/errors/
RedirectMatch permanent ^/ftp[\/]?$ http://admin.roughneck-media.de/ftp/
RedirectMatch permanent ^/pma[\/]?$ http://admin.roughneck-media.de/pma/
RedirectMatch permanent ^/webmail[\/]?$ http://admin.roughneck-media.de/webmail/
RedirectMatch permanent ^/ispcp[\/]?$ http://admin.roughneck-media.de/
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument
500 /errors/500.html
ErrorDocument 503 /errors/503.html
<IfModule mod_cband.c>
CBandUser example.org
</IfModule>
# httpd awstats support BEGIN.
# httpd awstats support END.
# httpd dmn entry cgi support BEGIN.
ScriptAlias /cgi-bin/ /var/www/virtual/example.org/cgi-bin/
<Directory /var/www/virtual/example.org/cgi-bin>
AllowOverride AuthConfig
#Options ExecCGI
Order allow,deny
Allow from all
</Directory>
# httpd dmn entry cgi support END.
<Directory /var/www/virtual/example.org/htdocs/current/public>
# httpd dmn entry PHP support BEGIN.
# httpd dmn entry PHP support END.
Options -Indexes Includes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# httpd dmn entry PHP2 support BEGIN.
<IfModule mod_php5.c>
php_admin_value open_basedir "/var/www/virtual/example.org/:/var/www/virtual/example.org/phptmp/:/usr/share/php/"
php_admin_value upload_tmp_dir "/var/www/virtual/example.org/phptmp/"
php_admin_value session.save_path "/var/www/virtual/example.org/phptmp/"
php_admin_value sendmail_path '/usr/sbin/sendmail -f vu2025 -t -i'
</IfModule>
<IfModule mod_fastcgi.c>
ScriptAlias /php5/ /var/www/fcgi/example.org/
<Directory "/var/www/fcgi/example.org">
AllowOverride None
Options +ExecCGI -MultiViews -Indexes
Order allow,deny
Allow from all
</Directory>
</IfModule>
<IfModule mod_fcgid.c>
Include /etc/apache2/mods-available/fcgid_ispcp.conf
<Directory /var/www/virtual/example.org/htdocs>
FCGIWrapper /var/www/fcgi/example.org/php5-fcgi-starter .php
Options +ExecCGI
</Directory>
<Directory "/var/www/fcgi/example.org">
AllowOverride None
Options +ExecCGI MultiViews -Indexes
Order allow,deny
Allow from all
</Directory>
</IfModule>
# httpd dmn entry PHP2 support END.
Include /etc/apache2/ispcp/example.org.conf
RewriteEngine On
# Make sure people go to www.myapp.com, not myapp.com
RewriteCond %{HTTP_HOST} ^myapp\.com$ [NC]
RewriteRule ^(.*)$ http://www.myapp.com$1 [R=301,L]
# Yes, I've read no-www.com, but my site already has much Google-Fu on
# www.blah.com. Feel free to comment this out.
# Uncomment for rewrite debugging
#RewriteLog logs/myapp_rewrite_log
#RewriteLogLevel 9
# Check for maintenance file and redirect all requests
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]
# Rewrite index to check for static
RewriteRule ^/$ /index.html [QSA]
# Rewrite to check for Rails cached page
RewriteRule ^([^.]+)$ $1.html [QSA]
# Redirect all non-static requests to cluster
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
# Deflate
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \\bMSIE !no-gzip !gzip-only-text/html
# Uncomment for deflate debugging
#DeflateFilterNote Input input_info
#DeflateFilterNote Output output_info
#DeflateFilterNote Ratio ratio_info
#LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
#CustomLog logs/myapp_deflate_log deflate
</VirtualHost>
# httpd [example.org] dmn entry END.
Does anyone know what could be wrong with it?