美文网首页
网站发布

网站发布

作者: stutterr | 来源:发表于2017-05-10 20:23 被阅读5次

    部署到服务器

    1.apache服务器

    将网站打包上传到apache服务器的htdocs目录下
    如果要在不同端口监听不同服务

    在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 改为你网站入口文件的目录
    ServerName一般是要绑定的域名,如果还没有域名要使用本地ip地址,则
    直接写为127.0.0.1就可以了。

    相关文章

      网友评论

          本文标题:网站发布

          本文链接:https://www.haomeiwen.com/subject/pszrnttx.html