Ubuntu Server上安装Apache笔记

安装:
sudo apt-get update
sudo apt-get install apache2

验证:
apache2 -version

配置:
vi /etc/apache2/apache2.conf
ServerName nonni.cn
DirectoryIndex index.html index.htm index.php /_h5ai/public/index.php
Listen 192.168.0.18:80

vi /etc/apache2/sites-available/000-default.conf
DocumentRoot /var

sudo vi /etc/apache2/mods-available/dir.conf

DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm /_h5ai/server/php/index.php

sudo service apache2 restart

发表评论

电子邮件地址不会被公开。

This site uses Akismet to reduce spam. Learn how your comment data is processed.