0
我想安裝在Ubuntu的一個虛擬主機,我的文件是這樣設置虛擬主機的Ubuntu
/var/www/vhost/domain1.com/app
/var/www/vhost/domain1.com/public
/var/www/vhost/domain2.com/app
/var/www/vhost/domain2.com/public
在/etc/apache2/site-avalable/domain1.com.conf
虛擬主機是:
<virtualhost *:80>
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
ServerAdmin [email protected]
ServerName domain1.com
ServerAlias *.domain1.com
DirectoryIndex index.php
DocumentRoot /var/www/vhosts/domain1.com/public
LogLevel warn
ErrorLog /var/www/vhosts/domain1.com/log/error.log
CustomLog /var/www/vhosts/domain1.com/log/access.log combined
</virtualhost>
問題
虛擬主機文件夾以及之後的所有文件(兒童)均可在網絡瀏覽器中訪問。我知道我必須加入某種htaccess,但我不知道如何以及在哪裏放置它。