SSL设置后无法访问Laravel子目录项目

时间:2019-03-19 02:05:14

标签: php laravel apache ssl

我将根目录下的React JS项目作为主页托管,并将Laravel项目托管在子文件夹中。以前,在SSL设置之前,我能够从子文件夹访问Laravel项目,但是在SSL设置之后,我无法从子文件夹访问Laravel项目。以下是SSL设置后我的apache.conf文件设置。

<VirtualHost *:80>
ServerName www.xxx.com.np
ServerAlias www.xxx.com.np
Redirect permanent / https://xxx.com.np/

<Directory "/var/www/xxx/html">
    Options Includes FollowSymLinks MultiViews
    AllowOverride All
    Require all granted
</Directory>
</VirtualHost>

<VirtualHost *:443>
ServerName www.xxx.com.np
ServerAlias www.xxx.com.np
DocumentRoot /var/www/xxx/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

SSLEngine on
SSLCertificateKeyFile /etc/ssl/xxx/key/myserver.key
SSLCertificateFile /etc/ssl/xxx/certs/xxx.crt
SSLCertificateChainFile /etc/ssl/xxx/certs/xxx.ca-bundle


<Directory "/var/www/xxx/html">
    Options Includes FollowSymLinks MultiViews
    AllowOverride All
    Require all granted
</Directory>
</VirtualHost>

服务器中的目录结构。

/ var / www / xxx / html => React项目

/ var / www / xxx / html / folder =>文件夹具有Laravel Project

/ var / www / xxx // html / folder1 => folder1 Laravel项目

当我访问xxx.com.np/folder1时,我得到了React的空白页路由,而不是访问/folder1子文件夹中的Laravel项目

0 个答案:

没有答案