sub domains on local server?

Status
Not open for further replies.

ziycon

New Member
Is it possible to setup sub-domains on localhost for development purposes?

Will it work to just ad the below to the apache conf file??
<VirtualHost *:80>
ServerAdmin admin@localhost
DocumentRoot “path_to_your\htdocs\folder_you_wish_to_use”
ServerName w3central.localhost
</VirtualHost>
 

ziycon

New Member
I was trying this but it wasn't working for me, do i just do it like below?

127.0.0.1 localhost
127.0.0.1/test test.localhost
 

ziycon

New Member
How else is test.localhost going to know the location of the site? The site isn't in the root webserver folder is it a directory called test in the root webserver dirtectory.
 

mneylon

Administrator
Staff member
How else is test.localhost going to know the location of the site? The site isn't in the root webserver folder is it a directory called test in the root webserver dirtectory.
I was hoping that you'd pick up on my reply, but obviously you didn't ...

You're doing virtual hosting in apache - please go read the docs
 

ziycon

New Member
I was hoping that you'd pick up on my reply, but obviously you didn't ...

You're doing virtual hosting in apache - please go read the docs
Sorry about that, was early in the morning, i get what you where on about now with the forward slash, i have apache configured and the hosts file updated and the sub-domains now work, only thing is I'm getting a forbidden error on the root directory now? :confused:
 
Status
Not open for further replies.
Top