laravel的indx.php,nginx,我可以看到是对laravel中“index.php”的测试

现在,Laravel5.6在我的服务器上,所以它对公众开放“部署”。问题是当我配置

nginx

使用Laravel的公共目录,我重新启动所有我能看到的就是测试

index.php

下载和保存选项。

nginx的访问日志:

162.158.22.173-[21/Jun/2018:23:18:39+0000]“获取/http/1.1”500 175902“-”Mozilla/5.0(Windows NT 10.0;Win64;X64)AppleWebKit/537.36(khtml,类似gecko)Chrome/67.0.3396.87 Safari/537.36”

/etc/nginx/sites available/laravel:

server {

listen 80 default_server;

listen [::]:80 default_server;

root /var/lib/jenkins/workspace/ytl/public;

# Add index.php to the list if you are using PHP

index index.php index.html index.htm index.nginx-debian.html;

server_name 157.32.4.241;

#location / {

try_files $uri $uri/ /index.php;

location ~ \.php$ {

#try_files $uri /index.php =404;

try_files $uri $uri/ /index.php?$args;

fastcgi_split_path_info ^(.+\.php)(/.+)$;

fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;

}

location ~ /\.ht {

deny all;

}

location ~ /git(/.*) {

client_max_body_size 0; # Git pushes can be massive, just to make sure nginx doesn't suddenly cut the connection add this.

auth_basic "Git Login"; # Whatever text will do.

auth_basic_user_file "/var/www/html/git/htpasswd";

include /etc/nginx/fastcgi_params; # Include the default fastcgi configs

fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; # Tells fastcgi to pass the request to the git http backend executable

fastcgi_param GIT_HTTP_EXPORT_ALL "";

fastcgi_param GIT_PROJECT_ROOT /var/www/html/git; # /var/www/git is the location of all of your git repositories.

fastcgi_param REMOTE_USER $remote_user;

fastcgi_param PATH_INFO $1; # Takes the capture group from our location directive and gives git that.

fastcgi_pass unix:/var/run/fcgiwrap.socket; # Pass the request to fastcgi

}

现在:当我打开url:its give me index.php文件时。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值