Images won't load in reverse proxy!
I'm having trouble getting images to load in my reverse proxy setup. I'm using Ubuntu Server with LAMP (Apache2 2.2.17).
I'm not sure what modules I have enabled or how to check what one are. Can I do this without modules? What steps should I take? Anyone know of a straignt forward tutorial? This is the 000-default file: <VirtualHost *:80> ProxyRequests Off ProxyPass /site1 http://192.168.0.2 ProxyPassReverse /site1 http://192.168.0.2 ProxyPass /site2 http://192.168.0.3 ProxyPassReverse /site2 http://192.168.0.3 ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost> |
It works now! All I had to do was put a / after the site names on ProxyPass and ProxyPassReverse in the 000-default file:
<VirtualHost *:80> ProxyRequests Off ProxyPass /site1/ http://192.168.0.2 ProxyPassReverse /site1/ http://192.168.0.2 ProxyPass /site2/ http://192.168.0.3 ProxyPassReverse /site2/ http://192.168.0.3 The problem I am now having is how to make it so that you can enter in the url as http://192.168.0.2/site1 without the final /. http://192.168.0.2/site1 will not load the page but http://192.168.0.2/site1/ works perfectly when entered in a web browser to reach the site. How can I make this work? |
All times are GMT -5. The time now is 11:56 AM. |