Nginx 分发 Apache

<Directory />
    # 不使用目录下的 .htaccess 文件
    AllowOverride none
    Allow from all
    
    Options +FollowSymLinks
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</Directory>


  location / {    #通用匹配,最后执行
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host;
        proxy_pass http://127.0.0.1:8098;
        #try_files $uri $uri/ /index.php;
        #try_files $uri $uri/ /index.php?$query_string;
        #return 200 $request_uri; 
    }
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容