Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: multiple sites on one server using DNS and redirect |
|
Author |
|
andrewm659
Joined: 04 Oct 2015 Posts: 2
|
Posted: Sun 04 Oct '15 22:42 Post subject: multiple sites on one server using DNS and redirect |
|
|
So I have 2 sites on this particular server and this is all internal, but when a user goes to websvn for instance, I want them to go to websvn.domain.local and it is going there but it is also redirecting to /phpmyadmin
Not sure what I'm doing wrong.
Here is what I have so far for websvn.conf
Code: |
Alias /websvn /usr/share/websvn/
ServerName websvn.borg.local
RewriteEngine On
RewriteCond %{REQUEST_URI} ^websvn.borg.local [nc]
RewriteRule (.*)$ /websvn/ [R=301]
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /websvn/ http://websvn.borg.local/websvn
ProxyPassReverse /websvn/ http://websvn.borg.local/websvn
<Directory /usr/share/websvn/>
Options +MultiViews
DirectoryIndex wsvn.php index.html index.php index.cgi index.pl
<IfModule mod_authz_core.c>
# Apache 2.4
Require ip 10.0.0.0/8 192.168.0.0/16 172.16.0.0/12
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
order deny,allow
deny from all
allow from 10.0.0.0/8 192.168.0.0/16 172.16.0.0/12
</IfModule>
</Directory>
|
Here is my phpMyAdmin.conf
Code: |
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
ServerName phpmyadmin.borg.local
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) /phpMyAdmin/ [R=301]
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /phpmyadmin/ https://phpmyadmin.borg.local/phpmyadmin/
ProxyPassReverse /phpmyadmin/ https://phpmyadmin.borg.local/phpmyadmin/
<Directory /usr/share/phpMyAdmin/>
|
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 07 Oct '15 12:12 Post subject: |
|
|
Why are you using rewrite plus reverse proxy?
The Alias plus the Directory block should do the job.
Are these diffrent vhosts? Cause I see different server names but not <VirtualHost *:80> |
|
Back to top |
|
|
|
|
|
|