![]() |
|
|||||||
| 服务器环境搭建 Windows,Linux,IIS,Apache等服务器配置、安全维护以及PHP和MYSQL运行环境讨论。 |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
IP: 49.87.0.53
|
|||
|
|||
|
以在Ubuntu 要配置 \var\www\linuxidc 目录为 0058.net为例
一、打开:\etc\hosts文件:sudo vi \etc\hosts 添加:127.0.0.1 0058.net 二、打开: \etc\apache2\sites-available\000-default 在头部添加:NameVirtualHost *:80 三、在目录:etc\apache2\sites-available\下新建一个为:‘0058’的文件(sudo touch 0058) 编辑该文件内容: <VirtualHost *:80> ServerName 0058.net ServerAlias *.0058.net DocumentRoot "/var/www/0058/" ErrorLog "/var/log/apache2/0058_errors.log" CustomLog "/var/log/apache2/0058_accesses.log" common </VirtualHost> 四、重启apache:sudo /etc/init.d/apache2 restart |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ubuntu下删除文件说权限不够 | topvip | 服务器环境搭建 | 0 | 2011-04-25 12:12 PM |