最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

amazon web services - why is apache bitnami config not handling virtual hosts correctly - Stack Overflow

programmeradmin1浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论