nginx - PHP

nginx 配置转向

location / {
        proxy_pass  http://localhost:8080;
        try_files $uri $uri/ =404;
    }

 

php 虚拟环境

<VirtualHost *:80>

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/erudite_valley/public
        ServerName localhost
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        #Include conf-available/serve-cgi-bin.conf

        <Directory /var/www/erudite_valley/public>

                #Options FollowSymLinks
                #Options Indexes FollowSymLinks MultiViews 

                #AllowOverride None

                DirectoryIndex index.html index.htm index.php
                options FollowSymLinks
                #DirectoryIndex index.php index.html server.php
                Allow from all
                AcceptPathInfo On
                AllowOverride All

        </Directory>

</VirtualHost>

 

posted @ 2019-10-22 14:23  我若亦如风  阅读(130)  评论(0编辑  收藏  举报