亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

EC2 實例上托管的 Laravel 項目的站點部署連接被拒絕

EC2 實例上托管的 Laravel 項目的站點部署連接被拒絕

PHP
桃花長相依 2023-09-15 17:31:17
我正在嘗試在運行 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貢獻1836條經驗 獲得超5個贊

通過添加一個ssl.conf文件以及與該文件project.conf.bak一起的解決了這個問題project.conf



查看完整回答
反對 回復 2023-09-15
?
陪伴而非守候

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>


查看完整回答
反對 回復 2023-09-15
  • 2 回答
  • 0 關注
  • 127 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號