nginx

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>
原文地址:https://www.cnblogs.com/cap-rq/p/11719559.html