我正在尝试在运行 CentOS7 的 AWS EC2 实例上使用 Laravel 部署我的网站。我已经检查以确保端口和流量设置正确,并且它们是因为我能够在编辑conf之前访问apache登陆页面,并且我还能够ssh并ping IP,但我相信我是配置文件可能存在一些问题。这就是我到达终点时所遇到的情况:我的 httpd 正在运行,并且我能够在编辑配置文件之前访问 apache 登录页面。这是我的 httpd.conf 的主要部分(请注意:我没有包含整个内容,因为它很大并且主要由注释掉的代码组成):# DocumentRoot: The directory out of which you will serve your# documents. By default, all requests are taken from this directory, but# symbolic links and aliases may be used to point to other locations.#DocumentRoot "/var/www/[project_path]/public"## Relax access to content within /var/www.#<Directory "/var/www/[project_path]/public"> AllowOverride All # Allow open access: Require all granted</Directory># Further relax access to the default document root:<Directory "/var/www/[project_path]/public"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All # # Controls who can get stuff from this server. # Require all granted</Directory>## DirectoryIndex: sets the file that Apache will serve if a directory# is requested.#<IfModule dir_module> DirectoryIndex index.html</IfModule>## The following lines prevent .htaccess and .htpasswd files from being# viewed by Web clients.#<Files ".ht*"> Require all denied</Files>
2 回答
陪伴而非守候
TA贡献1757条经验 获得超8个赞
您的 RewriteEngine 正在将端口 80 重定向到 HTTPS,该 HTTPS 会转到未定义的端口 443。
如果要在端口 80(HTTP 连接)下运行服务器,请删除
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</IfModule>
- 2 回答
- 0 关注
- 93 浏览
添加回答
举报
0/150
提交
取消