logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: apache reverse proxy give me 404 error
Author
lavaz



Joined: 21 Mar 2014
Posts: 3

PostPosted: Fri 21 Mar '14 13:38    Post subject: apache reverse proxy give me 404 error Reply with quote

Hi!!!

I need to get working an apache2 in suse 11 as reverse proxy with a vendor's web page and it is not working. This is what happens:

I load the page through the reverse proxy and i can see: http://192.168.1.10/cgi-bin/design/html_template/login.html
2. Then i write user and password
3. I press the login button and i should see:
http://192.168.1.10/cgi-bin/design/html_template/login.cgi
http://192.168.1.10/cgi-bin/design/html_template/webviewer.cgi

but instead of that i see:

404 Not Found
The requested URL /error/HTTP_BAD_GATEWAY.html.var was not found on this server.

What is wrong?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7294
Location: Germany, Next to Hamburg

PostPosted: Fri 21 Mar '14 17:41    Post subject: Reply with quote

How did you set up your reverse proxy?
Back to top
lavaz



Joined: 21 Mar 2014
Posts: 3

PostPosted: Fri 28 Mar '14 16:16    Post subject: Reply with quote

Sorry i could not answer before.

This is how i have configured the apache:

NameVirtualHost cam.fsap.com
<VirtualHost cam.fsap.com>

ServerName cam.fsap.com
ServerAlias cam.fsap.com
ProxyRequests On

ProxyPass / http://192.168.1.10
# ProxyPassReverse / https://192.168.1.10


DocumentRoot "/srv/www/htdocs"
ServerAdmin weba@fsap.com
ErrorLog /var/log/apache2/error_log
TransferLog /var/log/apache2/access_log
SSLEngine on
SSLProxyEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

SSLCertificateFile /etc/apache2/ssl.crt/fsap.com.crt
SSLCertificateKeyFile /etc/apache2/ssl.key/fsap.com.key
SSLCACertificatePath /etc/apache2/ssl.crt/
SSLCACertificateFile /etc/apache2/ssl.crt/SSL_CA_Bundle.pem

CustomLog /var/log/apache2/ssl_request_log ssl_combined
</VirtualHost>
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7294
Location: Germany, Next to Hamburg

PostPosted: Fri 28 Mar '14 17:01    Post subject: Reply with quote

I wonder why you commented out the ProxyPassReverse
How ever, could you present an url that is a 404?


Do you use Apache 2.2 or 2.4 ? if you use 2.4 you can also use mod_proxy_html to correct the wrong path in the HTML if there is something wrong.
Back to top
lavaz



Joined: 21 Mar 2014
Posts: 3

PostPosted: Mon 07 Apr '14 15:57    Post subject: Reply with quote

Hi,

The ProxyPassReverse is commented because of a test i made. Now it is uncommented again.

I use Apache 2.2

Regards.
Back to top
jraute



Joined: 13 Sep 2013
Posts: 188
Location: Rheinland, Germany

PostPosted: Mon 07 Apr '14 16:21    Post subject: Reply with quote

lavaz wrote:

<VirtualHost cam.fsap.com>

ServerName cam.fsap.com
ServerAlias cam.fsap.com
ProxyRequests On

ProxyPass / http://192.168.1.10
# ProxyPassReverse / https://192.168.1.10


DocumentRoot "/srv/www/htdocs"
ServerAdmin weba@fsap.com
ErrorLog /var/log/apache2/error_log
TransferLog /var/log/apache2/access_log
SSLEngine on
SSLProxyEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

SSLCertificateFile /etc/apache2/ssl.crt/fsap.com.crt
SSLCertificateKeyFile /etc/apache2/ssl.key/fsap.com.key
SSLCACertificatePath /etc/apache2/ssl.crt/
SSLCACertificateFile /etc/apache2/ssl.crt/SSL_CA_Bundle.pem

CustomLog /var/log/apache2/ssl_request_log ssl_combined
</VirtualHost>


1) Having ProxyRequests On is surely not useful if you want a reverse proxy.
It should be ProxyRequests Off.

2) You always need a ProxyPass and a ProxyPassReverse -Path

3) You should not mix http and https (have a look a what you typed)

4) Try to start without the SSLEngine/SSLProxyEngine !

Best Greetings
JR
Back to top


Reply to topic   Topic: apache reverse proxy give me 404 error View previous topic :: View next topic
Post new topic   Forum Index -> Apache