• 怎么在 localhost 下访问多个 Laravel 项目,通过一个IP访问多个项目(不仅仅是改变端口哦)



    server { listen 80; server_name blog.sweetsunnyflower.com; index index.html index.htm index.php; charset utf-8; # 项目1 location ^~ /project1/ { alias /var/www/project1/public/; try_files $uri $uri/ @project1; location ~ .php$ { fastcgi_pass unix:/run/php/php7.1-fpm.sock; fastcgi_index index.php; #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $request_filename; include fastcgi_params; } } location @project1 { rewrite /project1/(.*)$ /project1/index.php?/$1 last; } # 项目2 location ^~ /project2/ { alias /var/www/project2/public/; try_files $uri $uri/ @project2; location ~ .php$ { fastcgi_pass unix:/run/php/php7.1-fpm.sock; fastcgi_index index.php; #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $request_filename; include fastcgi_params; } } location @project2 { rewrite /project2/(.*)$ /project2/index.php?/$1 last; } access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log error; sendfile off; }

      

  • 相关阅读:
    jquery实现回车键执行ajax
    php post请求
    题解 P2825 【[HEOI2016/TJOI2016]游戏】
    莫队
    一些关于数学的知识(总结)
    P3232[HNOI2013]游走
    万物生长 / Tribles
    [BZOJ4244]邮戳拉力赛
    P1095 守望者的逃离
    P3953 逛公园
  • 原文地址:https://www.cnblogs.com/sweetsunnyflower/p/11635671.html
Copyright © 2020-2023  润新知