【发布时间】:2017-05-31 03:25:45
【问题描述】:
我想为我的 symfony elastic beanstalk PHP 应用程序实现基本的 http auth。我已经找到了this link where it is explained for an other php project,并根据我的 symfony 需求对其进行了一些调整。
files:
"/etc/httpd/conf.d/allow_override.conf":
mode: "000644"
owner: ec2-user
group: ec2-user
encoding: plain
content: |
<Directory /var/www/html/www/ />
AllowOverride AuthConfig
</Directory>
"/etc/httpd/conf.d/auth.conf":
mode: "000644"
owner: ec2-user
group: ec2-user
encoding: plain
content: |
<Directory /var/www/html/www/ />
AuthType Basic
AuthName "Myproject Prototype"
AuthUserFile /etc/httpd/.htpasswd
Require valid-user
</Directory>
"/etc/httpd/.htpasswd":
mode: "000644"
owner: ec2-user
group: ec2-user
encoding: plain
content: |
admin:lala
问题是:我不确定要在那里设置什么目录。 我试过了:
- /var/www/html/www/
- /var/www/html/www
- /var/www/html/
- /var/www/html
但这些都不起作用。我得到的只是一些错误 503。
【问题讨论】:
标签: php symfony amazon-web-services amazon-elastic-beanstalk