linux - xampp linux 中的虚拟主机设置

标签 linux apache phpmyadmin xampp vhosts

有人可以帮我在 XAMPP、Linuxmint 中配置虚拟主机吗?

Xampp 启动正确,我看到 xampp 橙色启动页面.. 没关系。 我在 '/opt/lampp/etc/extra' 目录中打开 vhosts 文件并添加以下代码

<VirtualHost 127.0.0.2:80>
    DocumentRoot "/opt/lampp/htdocs/test/public_html"
    ServerName test.dev
</VirtualHost>

还打开“etc/hosts”并添加以下内容:

127.0.0.2 test.dev

重新启动XAMPP...

但是结果,当我转到 test.dev 或 127.0.0.2 时,是相同的橙色启动页面..所以它显示了 127.0.0.1..

还有http://localhost/phpmyadmin/

说:

Access forbidden!

New XAMPP security concept:

Access to the requested object is only available from the local network.

This setting can be configured in the file "httpd-xampp.conf".

If you think this is a server error, please contact the webmaster.

Error 403

localhost
Apache/2.4.2 (Unix) OpenSSL/1.0.1c PHP/5.4.4

任何帮助将不胜感激!

提前谢谢您!

最佳答案

已解决。

刚刚取消注释 httpd.conf 中的字符串:

# XAMPP 
#Include etc/extra/httpd-vhosts.conf 

关于linux - xampp linux 中的虚拟主机设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11851513/

相关文章:

mysql - mySQL 脚本中的语法错误?

linux - 无法强制 Git 添加 linux/dev 设备

linux - buildroot 重新下载包

php - 替换为新日志文件后,访问日志将不会记录

mysql - 从我的 PhpMyadmin SQL 选项卡运行以下查询

c - 如何使用函数的参数唯一地 EXPORT_SYMBOL?

PHP fopen 在与 include 和 get_file_contents 一起正常工作的文件上返回 null

c++ - C++ 服务的 mod_gsoap 错误

mysql - 正确的选择语句

python - 错误的编码 - PhpMyAdmin/MySql