将 phpMyAdmin 映射到 CentOS 和 Apache 上的端口
我想知道如何设置虚拟主机,这样我只需输入 www.mydomain.com:9090 即可访问 phpmyadmin。这就是我现在在 httpd.conf 中设置虚拟主机的方式:
<VirtualHost *:80>
DocumentRoot /var/www/html/
ServerName mydomain.com
ServerAlias www.mydomain.com
</VirtualHost>
<VirtualHost *:9090>
DocumentRoot /usr/share/phpMyAdmin/
ServerName mydomain.com
ServerAlias www.mydomain.com
</VirtualHost>
这似乎不起作用。
I was wondering how I would go about setting up the virtual hosts so that I just have to enter www.mydomain.com:9090 to go to phpmyadmin. This is how I have my vhosts set up right now in httpd.conf:
<VirtualHost *:80>
DocumentRoot /var/www/html/
ServerName mydomain.com
ServerAlias www.mydomain.com
</VirtualHost>
<VirtualHost *:9090>
DocumentRoot /usr/share/phpMyAdmin/
ServerName mydomain.com
ServerAlias www.mydomain.com
</VirtualHost>
This does not seem to be working.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过添加...
Listen 9090
到您的配置中?Have you tried adding...
Listen 9090
to your config?在
/etc/httpd/conf.d/localhost.conf
中添加新的虚拟主机,然后在/etc/httpd/
中编辑httpd.conf
> 监听新端口。重新启动httpd,然后在IPtables中打开端口。应用新规则。Add the new Virtual host in
/etc/httpd/conf.d/localhost.conf
and then edithttpd.conf
in/etc/httpd/
to listen to new port. Restart httpd and then opened the port in IPtables. Apply the new rules.