在apache 服务器中增加 虚拟主机

# 在apache 服务器中增加 虚拟主机

# 在/etc/http/conf 目录下httpd.conf

Listen 8080
1

# 在/etc/http/conf.d 目录下创建 web8080.conf 文件,并增加如下内容

NameVirtualHost *:8080
<VirtualHost *:8080>
ServerAdmin ubuntu.firehare@gmail.com

DocumentRoot /var/www/glpi
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/glpi>

Options Indexes FollowSymLinks MultiViews
AllowOverride AuthConfig #表示进行身份验证
Order allow,deny
Allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog logs/error8080.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog logs/access8080.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
上次更新: 2022/12/05, 22:29:05

Initializing...

最近更新
01
git的tag与branch 原创
05-21
02
阿里云SLS日志服务的数据脱敏及安全管理 原创
03-21
03
云平台的成本管理 原创
03-13
更多文章>
×