: Subdomains on WampServer I'm working on WampServer for development, I've set up the domain tuniguide.local and it works fine with this configuration: DocumentRoot "D:wwwtuniguide" ServerName tuniguide.local
I'm working on WampServer for development, I've set up the domain tuniguide.local and it works fine with this configuration:
DocumentRoot "D:wwwtuniguide"
ServerName tuniguide.local
But when I wanted to add a subdomain fr.tuniguide.local I get a 404 Not Found with this configuration:
DocumentRoot "D:wwwtuniguidefr"
ServerName fr.tuniguide.local
It gives me this message:
The requested URL /www/tuniguide/index.php was not found on this server.
Is there someting that I missed?
Thanks.
More posts by @Cooney921
1 Comments
Sorted by latest first Latest Oldest Best
I think Virtual Hosts and updating your hosts file would help in this case. In your server config file, you'll want to make sure it's turned on for your port with this line:
NameVirtualHost *:80
Then you want to specify each virtual host:
<VirtualHost *:80>
DocumentRoot "D:wwwtuniguide"
ServerName tuniguide.local
# Other directives here
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:wwwtuniguidefr"
ServerName fr.tuniguide.local
# Other directives here
</VirtualHost>
Then finally you'll want to update your host file to include something like this:
127.0.0.1 tuniguide.local
127.0.0.1 fr.tuniguide.local
Note: Be sure to restart Apache after you've updated both the config and hosts file.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.