DontVoteMeDown
DontVoteMeDown

Reputation: 21465

Apache mirroring folder

So I have a PHP system over an Apache Server running on a Window SO. I want to create some kind of a mirror of it to make tests and whatever without have to copy the source code. For example: Actual scenario:

http://192.168.1.1/finantial lies on C:\EasyPHP\www\finantial

I want to create this:

http://192.168.1.1/finantial_test that points to the same source code that the address above.

When this configs were ok, I can make the app to use different database.

Upvotes: 0

Views: 150

Answers (2)

DontVoteMeDown
DontVoteMeDown

Reputation: 21465

It's so easy to do that. Just add an Alias to your VirtualHost like...

<VirtualHost *:80>
Alias /finantial_test "C:/EasyPHP/www/finantial"
</VirtualHost>

Upvotes: 1

Gntem
Gntem

Reputation: 7165

on real server the configuration should be like this

test_financial.conf

<VirtualHost *:80>
DocumentRoot /var/www/financial
ServerName test.financial.com
</VirtualHost>

financial.conf

<VirtualHost *:80>
DocumentRoot /var/www/financial
ServerName financial.com
</VirtualHost>

Upvotes: 1

Related Questions