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 Virtual Host not working properly
Author
bakenoor



Joined: 30 Dec 2017
Posts: 1
Location: France

PostPosted: Sat 30 Dec '17 22:54    Post subject: Apache Virtual Host not working properly Reply with quote

I have an application running at http://localhost:6512 and a virtual host definition as follows:

<VirtualHost *:80>
ServerName ldpmarmotta.example.com
ProxyPassMatch ^/(.*)$ http://localhost:6512/marmotta/$1
</VirtualHost>
I am getting two problems with the above definition:
1. All traffic to this server including http://example.com is being directed to http://localhost:6512
2. A request to http://ldpmarmotta.example.com is being directed to http://localhost:6512. I was not expecting the URL to change but the response to return on http://ldpmarmotta.example.com,
Back to top
James Blond
Moderator


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

PostPosted: Thu 18 Jan '18 23:23    Post subject: Reply with quote

Try
[code]
<VirtualHost *:80>
ServerName ldpmarmotta.example.com
DocumentRoot "/mario/Apache24/htdocs"
<Directory "/mario/Apache24/htdocs">
Options Indexes Includes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Location />
ProxyPass http://localhost:6512/marmotta/
ProxyPassReverse http://localhost:6512/marmotta/
</Location>
</virtualhost>
{/code]
Back to top


Reply to topic   Topic: Apache Virtual Host not working properly View previous topic :: View next topic
Post new topic   Forum Index -> Apache