2013年7月10日 星期三

install apache virtual host


vi /etc/httpd/conf/httpd.conf
Apache
1.Exectute Right
2.Directory right 777
3.Apache / chinese word. char set : utf:8
4.Selinux
/var/www/html
/var/lib/mysql/test
Virtual Host NameVirtualHost *:80
<VirtualHost *:80>
    ServerAdmin services@vhost.com
    ServerName www.riaproject.com
    DocumentRoot “C:/www”
    ErrorLog logs/www.riaproject.com-error_log
    CustomLog logs/www.riaproject.com-access_log common
</VirtualHost>
<Directory “C:/www”>
    Options -Indexes -FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory> 
chcon chcon -t httpd_sys_content_t /var/www/html/about.html.
chcon -R -h -t httpd_sys_content_t /path/to/directory
chcon -Rht httpd_sys_con_content_t /foo/bar
restorecon -R /var/www/html
chcon -t httpd_sys_content_t/var/www/html/aaa.html
httpd.conf
e.g.
Servertype ServerType standstone
ServerRoot ServerRoot "/usr/local/aprache"
Pidfile
TimeOut TimeOut500
Keepalive On KeepAlive On
MaxKeepAliveRequest 100 MaxKeepAliveRequest 0
KeepaliveTimeout 15 Keepalivetimeout 15
MinSpareServers MinSpareServers 5
MaxspareServers MaxspareServers 10
StartServers 5 StartServers 5
MaxClients 150 MaxClients 150
Port 80 Port 80
User nobody User apache
Group nogroup Group apache
ServerAdmin Serveradmin channel@armani.com
ServerName ServerName test.test.com
DocumntRoot
Directory
Order
UserDir
Directory Index
DefaultType
HostNameLookups
ErrorLog
LogLevel
Alias

沒有留言:

張貼留言