如何更改apache配置文件的默认路径?

时间:2022-10-06 10:08:31

Does anyone know, how to change(or reinstall) default path for apache configuration files?

有谁知道,如何更改(或重新安装)apache配置文件的默认路径?

configuration file in

配置文件

...

...

/etc/apache2/apache2.conf

/etc/apache2/apache2.conf中

/etc/apache2/httpd.conf

/etc/apache2/httpd.conf

....

....

or something else

或者是其他东西

i'm working on ubuntu linux 13.04 with apt-get installed.

我正在安装apt-get的ubuntu linux 13.04上工作。

2 个解决方案

#1


1  

All the configurations files are read by Apache when apache starts. Thus you can store your configuration files in sites-enabled/ and apache will read all the configuration files from there.

apache启动时,Apache会读取所有配置文件。因此,您可以将配置文件存储在sites-enabled /中,并且apache将从那里读取所有配置文件。

You can also append the following line in /etc/apache/apache2.conf: Include /home/user/directory-for-conf

您还可以在/etc/apache/apache2.conf中追加以下行:Include / home / user / directory-for-conf

#2


0  

I think what you are after is the -f flag that let you specify a main configuration file at startup. It's explained in detail in Starting Apache document section.

我认为你所追求的是-f标志,它允许你在启动时指定一个主配置文件。它在Starting Apache document部分中有详细解释。

Hope it helps.

希望能帮助到你。

#1


1  

All the configurations files are read by Apache when apache starts. Thus you can store your configuration files in sites-enabled/ and apache will read all the configuration files from there.

apache启动时,Apache会读取所有配置文件。因此,您可以将配置文件存储在sites-enabled /中,并且apache将从那里读取所有配置文件。

You can also append the following line in /etc/apache/apache2.conf: Include /home/user/directory-for-conf

您还可以在/etc/apache/apache2.conf中追加以下行:Include / home / user / directory-for-conf

#2


0  

I think what you are after is the -f flag that let you specify a main configuration file at startup. It's explained in detail in Starting Apache document section.

我认为你所追求的是-f标志,它允许你在启动时指定一个主配置文件。它在Starting Apache document部分中有详细解释。

Hope it helps.

希望能帮助到你。