Я использую виртуальный сервер от:
- VirtualBox v5.2.12
- Ubuntu v18.04
- Apache v2.4.29
- php7.1.17
- Magento v2.2.4
Все идет хорошо, пока я не установлю magento!Работает Magento без проблем на сервере, но проблема здесь в том, что когда я зашел на mywebsite.com , он показывает мои файлы и индексирование, и я хочу вместо этого показать свой index.html :
Index of /
Name Last modified Size Description
index.html 2018-05-28 03:47 180
info.php 2018-06-04 12:39 20
magento2/ 2018-05-01 23:21 -
Apache/2.4.29 (Ubuntu) Server at mywebsite.com Port 65533
Я попробовал много ответов, но безуспешно.
Вот /etc/apache2/apache2.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
А вот / etc / apache2 / sites-available /mywebsite.com.conf
Listen 65533
<VirtualHost mywebsite.com:65533>
ServerName www.mywebsite.com
ServerName mywebsite.com
ServerAdmin info@mywebsite.info
ServerName mywebsite.com
ServerAlias www.mywebsite.com
DocumentRoot /var/www/mywebsite.com/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/mywebsite.com/html/>
Options Indexes FollowSymLinks Multiviews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Вот /etc/apache2/sites-available/000-default.conf.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>