ubuntu下配置网址

ubuntu和windows不同,没有httpd.conf这个文件。那么它的配置是在哪里呢。

apache2配置文件最主要有两个,etc/apache2文件夹下面。一个是apache2.conf,另一个在子文件夹site-available下面,000-default.conf。

配置时只需修改000-default。conf文件即可。


ubuntu下配置网址_第1张图片



修改默认网页:

修改/etc/apache2/mods-available/dir.conf中的内容

原来是:

DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm

添加上想要的/wordpress就行啦。

DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm /wordpress

你可能感兴趣的:(ubuntu下配置网址)