无法在本地主机上访问Apache 2虚拟主机
我原来在/etc/apache2/sites-available/000-default.conf设置我的web根目录指向/home/me/www 。 由于需要一个新的项目,我需要能够设置/home/me/www/vendor/www作为自己的虚拟主机,因为localhost/blah/blah/blah导致它失败(该网站是非常可怕的,codewise,这就是为什么我已经签约工作)。 我在我的/etc/apache2/sites-available有以下configuration文件 – project2.com.conf : <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName project2 ServerAlias localcopy ServerRoot /home/me/www/vendor/www/ DocumentRoot /home/me/www/vendor/www/ <Directory /home/me/www/vendor/www> Header set Access-Control-Allow-Origin "*" Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> # Available loglevels: trace8, …, trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible […]