Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AMPPS Virtualhost deosn't work

  1. I update /etc/hosts and test the ping, the domain works;
  2. I use ampps admin tool to add domain, and verify the modification as the content below.
<VirtualHost 127.0.0.1:80>
<Directory "/www/companyname">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory>
ServerName local.companyname.com
ServerAlias local.companyname.com
ScriptAlias /cgi-bin/ "/www/companyname/cgi-bin/"
DocumentRoot "/www/companyname"
ErrorLog "/Applications/AMPPS/apache/logs/local.companyname.com.err"
CustomLog "/Applications/AMPPS/apache/logs/local.companyname.com.log" combined
</VirtualHost>

then I restart the AMPPS, but it still doesn't work. It would connect to the default 127.0.0.1 page not my '/www/companyname' page.

like image 297
Weijing Jay Lin Avatar asked Mar 07 '26 10:03

Weijing Jay Lin


2 Answers

The problem is due the default setting of AMPPS, you should create 'extra' folder under the AMPPS/conf folder, it is not the one under AMPPS/apache/extra, should be AMPPS/conf/extra.

like image 85
Weijing Jay Lin Avatar answered Mar 10 '26 16:03

Weijing Jay Lin


I had to add an "extra" folder directly beneath the Ampps directory.

Ampps/extra/

After that everything started working as expected.

like image 45
PhPGuy Avatar answered Mar 10 '26 14:03

PhPGuy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!