Reputation: 41
I have recently switched from XAMPP to AMPPS. I'm trying to create virtual hosts on my Windows 10 machine but can't get them work. This is how I'm creating them in the hosts file:
127.0.0.1 localhost
127.0.0.1 mysite.com
Then, in my httpd.conf located in ampps/apache/conf I have the following virtual host:
<VirtualHost 127.0.0.1:80>
ServerName mysite.com
DocumentRoot "C:/ampps/www/mysite/public"
</VirtualHost>
I'm currently working on a laravel project, I know there is homestead but in this case we are working with ampps, that's what I need to do this.
When I open mysite.com It returns server not found. I think that it's a windows problem. Thanks in advance.
Upvotes: 4
Views: 3574
Reputation: 11
AMPPS 3.9 have write and read access problem in host file but it is able to create directory in root ( www ). but not write domain name automatically in host file. I have to manually input the domain name in the host fie.
Upvotes: 1
Reputation: 29
I believe you are editing the wrong file on the wrong folder, as the correct path is \Ampps\apache\conf\extra\httpd-vhosts.conf. Regardless, you should not edit this file directly. You can either use the add domain form as suggested, or force ampps into reading a custom vhosts file.
Have a look at this thread for more info:
http://www.softaculous.com/board/index.php?tid=2077&title=Using_multiple_domains
Upvotes: 0
Reputation: 3844
There is web interface for this inside AMPPS. Just open http://localhost/ampps/ in your favourite browser. And click on Add Domain icon.
Upvotes: 0