Linux Mint上的Apache配置在哪里?


5

使用命令

gedit /etc/apache2/httpd.conf

生成一个只包含一行的文本文件。我需要更改Apache配置的DocumentRoot,以便与CakePHP框架一起使用。


看到你已经发布了关于几乎相同主题的两个问题,我建议你询问做一些阅读/搜索
m0skit0

Answers:


6

在基于Debian的系统(Mint是)上,Apache配置采用了不同的方法。每个“站点”都有自己的配置/etc/apache2/sites-available
默认配置已命名default。所以,试试:

gedit /etc/apache2/sites-available/default

不要忘记之后重新加载或重启Apache:

sudo invoke-rc.d apache2 restart

作为旁注,您可以使用以下命令创建其他配置文件/etc/apache2/sites-available并激活它们:

sudo a2ensite <yourconfig>

您可以使用以下命令禁用相同的配置

sudo a2dissite <yourconfig>

对不起,我是新手,你的解释让我很困惑,我是php和webserver设置以及所有Linux命令的新手。什么是“网站可用”?你能帮助我通过localhost:80在Mint上配置使用apache的cakephp吗?我只用这个来测试我学到的东西。
Thach Xuyen

sites-available只是硬盘上的另一个文件夹。httpd.conf您必须在嵌套文件夹中打开另一个文件(该文件已命名default),而不是在gedit中打开。我希望我能为你提供一些截图,但我遇到了一些麻烦。
Der Hochstapler

注意,该文件可能名为000-default.conf,SSL文件也是如此,它是default-ssl.conf。
MarceloÁgil
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.