以前不太常rpm安裝,但現在想來用簡單的快速安裝,所以很多centos 6.3安裝好後,apache,mysql,php都要手動自已裝
#>yum install php*
#>yum install httpd*
#>yum install mysql mysql-server
最後在/etc/httpd/conf/httpd.conf
裡來設定vhost
<VirtualHost *:80>
ServerAdmin hmc0316@gmail.com DocumentRoot /var/www/html/main ServerName www1.hmc.cn </VirtualHost> <VirtualHost *:80> ServerAdmin hmc0316@gmail.com DocumentRoot /var/www/html/admin ServerName admin.hmc.cn </VirtualHost>但是呢,後來還不能啟動,原因少了一行
NameVirtualHost *:80
就這樣而已,
再來,如果設定.htaccess,要在/var/www/html裡生效,得這麼做
加上了
<Directory "/var/www/html">
AllowOverride All Options Indexes FollowSymLinks MultiViews ExecCGI Order allow,deny Allow from all </Directory>
就行了!!