部署到服務器
1.apache服務器
將網(wǎng)站打包上傳到apache服務器的htdocs目錄下
如果要在不同端口監(jiān)聽不同服務
在httpd-vhosts.conf目錄下添加一下代碼
Listen 81
<VirtualHost *:81>
ServerAdmin test@example.com
DocumentRoot "/www/server/apache/htdocs/gaoxueya/public"
ServerName 127.0.0.1
#ErrorLog "/www/wwwlogs/BT_default_error.log"
#CustomLog "/www/wwwlogs/BT_default_access.log" combined
<FilesMatch \.php$>
SetHandler "proxy:unix:/tmp/php-cgi-56.sock|fcgi://localhost"
</FilesMatch>
<Directory "/www/server/apache/htdocs/gaoxueya/public">
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html index.php
</Directory>
</VirtualHost>
DoucmentRoot 改為你網(wǎng)站入口文件的目錄
ServerName一般是要綁定的域名贵扰,如果還沒有域名要使用本地ip地址新娜,則
直接寫為127.0.0.1就可以了沾凄。