admin管理员组文章数量:1345448
I have created a new Lightsail LAMP server with a virtual host, which I created by adding a VirtualHost entry to the conf file /opt/bitnami/apache/conf/extra/httpd-vhosts.conf. The virtual host is one level down from htdocs. Here is the entry (edited for anonymity):
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/opt/bitnami/apache/htdocs/example"
ServerName example-test
<Directory "/opt/bitnami/apache/htdocs/example">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I also un-commented the line in /opt/bitnami/apache/conf/httpd.conf which includes the extra/httpd-vhosts.conf file. All I have in htdocs/example is the default index.html page which i moved from the htdocs folder. I have also used /opt/bitnami/bncert-tool to generate an SSL certificate.
The problem is, when I use the browser to display the startup page, i get an index.
Things I've tried:
- changing the options line to Options -Indexes +MultiViews +FollowSymLinks. This didn't change anything.
- not using the extra/httpd-vhosts.conf file but instead putting everything into the /opt/bitnami/apache/conf/httpd.conf file. This didn't change anything.
- adding an .htaccess file with giberish in it in the htdocs/example folder. This caused an error, which showed me that it was trying to get to the htdocs/example folder.
- removing the two example virtual hosts that are in the extra/httpd-vhosts.conf file. This didn't change anything.
- adding a VirtualHost listening on port 443 instead of 80. This didn't work.
After each change I restarted the server using sudo /opt/bitnami/ctlscript.sh restart
I've spent hours and hours on this. I have looked at many similar problems reported here, but none of the solutions have worked. I have double- and triple-checked spellings, they all look good.
本文标签: amazon web serviceswhy is apache bitnami config not handling virtual hosts correctlyStack Overflow
版权声明:本文标题:amazon web services - why is apache bitnami config not handling virtual hosts correctly - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743812490a2543329.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论