Amazon web services AWS ECS:无法通过URL访问。给你don';您没有访问此资源的权限
上面的东西现在很好用。似乎缺少Apache或PHP配置,因此无法访问网站Amazon web services AWS ECS:无法通过URL访问。给你don';您没有访问此资源的权限,amazon-web-services,docker,drupal,amazon-ecs,Amazon Web Services,Docker,Drupal,Amazon Ecs,上面的东西现在很好用。似乎缺少Apache或PHP配置,因此无法访问网站 Forbidden You don't have permission to access this resource. Apache/2.4.25 (Debian) Server at 51.11.211.110 Port 80 DockerFile FROM drupal:8.6-apache RUN apt-get update && apt-get install -y \ curl
Forbidden
You don't have permission to access this resource.
Apache/2.4.25 (Debian) Server at 51.11.211.110 Port 80
DockerFile
FROM drupal:8.6-apache
RUN apt-get update && apt-get install -y \
curl \
git \
mysql-client \
vim \
wget
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php composer-setup.php && \
mv composer.phar /usr/local/bin/composer && \
php -r "unlink('composer-setup.php');"
RUN wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.4.2/drush.phar && \
chmod +x drush.phar && \
mv drush.phar /usr/local/bin/drush
COPY apache-drupal.conf /etc/apache2/sites-enabled/000-default.conf
WORKDIR /drupal/web
docker compose.yml
文件
version: '3'
services:
drupal:
image: drupal:latest
container_name: drupal
build: .
ports:
- "8081:80"
volumes:
- ./:/drupal/web
restart: always
<VirtualHost *:80>
DocumentRoot "/drupal/web/"
DirectoryIndex index.php
<Directory "/drupal/web/">
AllowOverride All
Require all granted
</Directory>
ErrorLog /drupal/web/error.log
CustomLog /drupal/web/access.log combined
</VirtualHost>
apachedrupal.conf文件
version: '3'
services:
drupal:
image: drupal:latest
container_name: drupal
build: .
ports:
- "8081:80"
volumes:
- ./:/drupal/web
restart: always
<VirtualHost *:80>
DocumentRoot "/drupal/web/"
DirectoryIndex index.php
<Directory "/drupal/web/">
AllowOverride All
Require all granted
</Directory>
ErrorLog /drupal/web/error.log
CustomLog /drupal/web/access.log combined
</VirtualHost>
DocumentRoot“/drupal/web/”
DirectoryIndex.php
允许超越所有
要求所有授权
ErrorLog/drupal/web/error.log
CustomLog/drupal/web/access.log组合
它给出了上述误差。可能是我在DockerFile
中缺少的东西
docker日志中出现错误
无法为目录/var/www/web/:没有匹配的目录索引
(index.php,index.html)找到,并由服务器生成目录索引
期权指令禁止
[更新]
在添加apache.conf
文件后,它给出了以下错误
AH00014:配置检查失败没有此类文件或目录:
AH02291:由于出现错误,无法访问目录“/var/www/web/docker/logs/”
在/etc/apache2/sites enabled/000 default中定义的vhost日志。conf:1
现在我可以通过IP访问,但它只显示
error.log
&access.log
文件。不是我的Drupal项目这是一个apache错误,请检查apache conf….我不确定如何检查dockerHi@LinPy中的onedocker日志或apache日志。我已更新了所有信息。请查看一下,“/var/www/web/”中是否有index.php,index.html
?在apache.conf中是否有DirectoryIndex.html index.php
?