SVC*_*SVC 4 php apache httpd.conf
我在同一台机器上有两个示例应用程序.它是PHP.我需要开发支持跨域cookie的应用程序.所以,现在我想在apache服务器的不同端口运行两个应用程序.所以我改变了httpd.conf中的端口号.就像我添加了 Listen 8080 并且我没有得到关于
VirtualHost *:80
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /www/docs/dummy-host.example.com
ServerName dummy-host.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
Run Code Online (Sandbox Code Playgroud)
请让我知道如何为我的第二个端口8080添加它.我从浏览器运行我的应用程序xxx.xx.x.xx/First/Cookies.我尝试了xxx.xx.x.xx:80/First/Cookies.这很好,我怎么能为我的第二个应用程序尝试8080.请指导我.
这应该是你需要的最低限度.随意添加其他有用的指令.
Listen 80
<VirtualHost *:80>
DocumentRoot /home/x/z/
... the usual stuff ...
</VirtualHost>
Listen 20117
<VirtualHost *:20117>
DocumentRoot /home/x/y/public_html
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
<VirtualHost SERVERNAME:8080>
ServerAdmin webmaster@another-host.example.com
ServerName SERVERNAME:8080
DocumentRoot "/www/docs/another-host.example.com"
ErrorLog logs/another-host.example.com-error_log
CustomLog logs/another-host.example.com-access_log common
Run Code Online (Sandbox Code Playgroud)
还要在 httpd.conf 文件中添加这一行
Listen 8080
<Directory "/www/docs/another-host">
Options All
AllowOverride All
Order allow,deny
Allow from all
Run Code Online (Sandbox Code Playgroud)
还添加这个