图片显示我点击了终端:
sudo vim /etc/apache2/sites-available/fusion_invoice.dev.conf
之后在sitepoint.com上说我需要复制下面的粘贴:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/fusioninvoice
ServerName fusion.invoice.dev #change this setting according to your domain name
DirectoryIndex index.php
<Directory /var/www/fusioninvoice>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
我不知道要改变哪条路。
帮助!
答案 0 :(得分:0)
在您提到的文件Apache配置文件中,添加以下代码:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/fusioninvoice # <<< CHANGE THIS PATH TO THE ABSOLUTE PATH ON YOUR SERVER WHERE THE CODE IS STORED
ServerName fusion.invoice.dev #change this setting according to your domain name
DirectoryIndex index.php
<Directory /var/www/fusioninvoice> # <<< ALSO, CHANGE THIS PATH TO THE ABSOLUTE PATH ON YOUR SERVER WHERE THE CODE IS STORED. SAME AS ABOVE
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
我希望现在很清楚:)