Forum

VirtualHost with private address

Pippo
20 February 2008, 21:00
I'm trying Hiawatha in a local enviroment.

On the hiawatha machine (192.168.x.x) there are several service like phpmyadmin, web based file server and so on.

When i set virtual hosting with private address (192.168.x.x) for each service i can't access them from a machine on the same network and 404 file not found error appears.

I've tried with

192.168.x.x/phpmyadmin
192.168.x.x/fileserver

but doesn't work!!


How can i set virtual hosting for a local environment??

Thanks for your patience.


regards


Pippo
Hugo Leisink
20 February 2008, 22:43
I don't understand what you mean. Please, post your httpd.conf and tell me your problem.
Pippo
21 February 2008, 12:52
This is my httpd.conf:

Hostname = 127.0.0.1
WebsiteRoot = /var/www/blank
StartFile = index.html

Virtualhost {
Hostname = 192.168.168.x/phpmyadmin
WebsiteRoot = /var/www/phpmyadmin
StartFile = index.php
}

VirtualHost {
Hostname = 192.168.168.x/test
WebsiteRoot = /var/www/test
StartFile = index.php
}

When i try to connect to http://192.168.16.x/test, from a remote machine on the same lan, hiawatha sends 404 error.

What's wrong??

regards

Pippo
Hugo Leisink
21 February 2008, 12:59
That's because 192.168.168.x/phpmyadmin is not a hostname!

if you use
Virtualhost {
Hostname = 192.168.168.x
WebsiteRoot = /var/www
StartFile = index.php
}


it should work. 192.168.168.x is your hostname. /phpmyadmin and /test are directories inside the virtualhost. Because your virtualhost points to /var/www, those paths should be available in /var/www. They probably already are.
Pippo
21 February 2008, 15:11
OK!! I had already made this solution but it didn't work because i had made an error in the httpd.conf

Thanks

Pippo
This topic has been closed.