[英]How do I route SSL traffic through an AWS "Application Load Balancer" to an EC2 instance
[英]How do I get apache to load an index file inside a folder from a github repo that is cloned into my EC2 instance?
我已经在我的 EC2 实例上安装了 apache,但无法配置 my.htacess 以重定向到位于文件夹内的索引文件。
这就是我所拥有的:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^[domain name] [NC,OR]
RewriteCond %{HTTP_HOST} ^[domain name]
RewriteCond %{REQUEST_URI} ![repository folder]/
RewriteRule ^(.*)$ /[repository folder]/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html`
我试图将位于存储库文件夹中的 index.html 文件用作索引页。
如果将 Apache 文档根目录配置为存储库文件夹,则不需要重定向。 请务必将默认索引文件设置为 index.html(可能是默认值)。
<VirtualHost *:80>
DocumentRoot "/home/git/public_html/my_repo_name"
ServerName www.mydomain.com
DirectoryIndex index.html
</VirtualHost>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.