ubuntu下配置网址

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

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

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




修改默认网页:

修改/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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容