[英]How to run different website in a same domain with HTTP and HTTPS
我可以在同一个域中运行不同的网站吗? 喜欢
http://www.example.com ----> in WordPress
https://example.com/ -----> in laravel
这是参考站点
Website : www.linqs.in
APP: https://linqs.in/username
应用网址将通过提供的用户名打开用户的个人资料。
对不起,如果我弄错了! 如果可以的话,请指导我。
由于URL侦听端口,例如http-端口80,https-端口443。因此,您可以通过VirtualHost configure确保同一域中的其他网站。
您可以在虚拟主机配置中执行此操作:
Listen 80
Listen 443
<VirtualHost *:80>
ServerName example.com
DocumentRoot "/path/to/wordpress"
</VirtualHost>
<VirtualHost *:443>
ServerName example.com
DocumentRoot "/path/to/laravel/public"
</VirtualHost>
如果源不在默认的http根目录下,则可能还需要定义目录。 例如:
<VirtualHost *:443>
ServerName example.com
DocumentRoot "/path/to/laravel"
<Directory /path/to/laravel>
AllowOverride All
</Directory>
</VirtualHost>
这也将允许Apache服务该目录并使用任何.htaccess文件(如果尚未允许)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.