.htaccess Laravel 10 Centos 7 htaccess文件已删除,但仍在加载

xam8gpfp  于 2023-03-19  发布在  其他
关注(0)|答案(1)|浏览(111)

我设法让我的网站完全部署在运行apache的数字海洋上,除了在我添加ssl证书后,它无法启动。在查看错误日志时,这是我收到的。

[Tue Mar 14 05:33:19.296072 2023] [core:alert] [pid 19204] [client 183.129.153.157:51241] /home/centos/www/mysite/public/.htaccess: /home/centos/www/mysite/public/.htaccess:1: <<<<<<<> was not closed.

那个htaccess文件被删除了,我在它自己的服务器上发布了那个项目。与它相关联的虚拟主机文件也被删除了。
更新:原来我忘记运行“setenforce 0”,但我有一个新的错误httpd:/etc/httpd/conf/httpd.conf的第356行上的语法错误:无法打开配置目录/home/centos/vhosts:权限被拒绝
目录和所有子文件夹具有755权限
我的虚拟主机配置

<VirtualHost *:80>
        ServerAdmin me@me.com
        ServerName www.mysite.com
        ServerAlias www.mysite.com
        DocumentRoot "/home/centos/www/mysite/public"
        ErrorLog /home/centos/logs/error_log
        CustomLog /home/centos/logs/access_log combined
        <Directory "/home/centos/www/casacoding/public">
                        Options Indexes FollowSymLinks
                        AllowOverride All
                        Require all granted
        </Directory>
</VirtualHost>

<VirtualHost *:443>
        ServerAdmin me@me.com
        ServerName www.mysite.com
        ServerAlias www.mysite.com
        DocumentRoot "/home/centos/www/mysite/public"
        ErrorLog /home/centos/logs/error_log
        CustomLog /home/centos/logs/access_log combined
        <Directory "/home/centos/www/mysite/public">
                        Options Indexes FollowSymLinks
                        AllowOverride All
                        Require all granted
        </Directory>
        SSLCertificateFile "/home/centos/vhosts/mysite-com.csr"
        SSLCertificateKeyFile "/home/centos/vhosts/mysite-com.key"
        SSLCertificateChainFile "/home/centos/vhosts/sslcert/CER - CRT Files/STAR_casacoding_com.pem"
</VirtualHost>

如有任何帮助或指导,不胜感激。

jecbmhm3

jecbmhm31#

我想通了!!!私钥有正确的权限,但在centos组而不是根组中。砰!工作!

相关问题