[英]Run two php application in two different ports in apache
i have two sample application in the same machine. 我在同一台机器上有两个示例应用程序。 it is PHP.
它是PHP。 i am in need to develope application that supports cross domain cookies.
我需要开发支持跨域cookie的应用程序。 so ,now i am trying to run two application in different port in apache server.
所以,现在我想在apache服务器的不同端口运行两个应用程序。 so for that i changed the port number in httpd.conf.
所以我改变了httpd.conf中的端口号。 like i added Listen 8080 and i am not getting about the
就像我添加了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
Please let me know how to add that for my second port 8080. i run my application from the browser as xxx.xx.x.xx/First/Cookies. 请让我知道如何为我的第二个端口8080添加它。我从浏览器运行我的应用程序xxx.xx.x.xx / First / Cookies。 i tried as xxx.xx.x.xx:80/First/Cookies.----this is fine, how can i try it for 8080 for my second application.
我尝试了xxx.xx.x.xx:80 / First / Cookies。这很好,我怎么能为我的第二个应用程序尝试8080。 Please guide me.
请指导我。
This should be the bare minimum you need. 这应该是你需要的最低限度。 Add other useful directives at will.
随意添加其他有用的指令。
Listen 80
<VirtualHost *:80>
DocumentRoot /home/x/z/
... the usual stuff ...
</VirtualHost>
Listen 20117
<VirtualHost *:20117>
DocumentRoot /home/x/y/public_html
</VirtualHost>
<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
also add this line in httpd.conf file 也在httpd.conf文件中添加此行
Listen 8080
<Directory "/www/docs/another-host">
Options All
AllowOverride All
Order allow,deny
Allow from all
also add this 还加上这个
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.