#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections ...
转载 2018-10-12 13:29:00
218阅读
2评论
location / {        root   /usr/share/nginx/html;        index  index.html index.htm;        if (!-e $request_filename) { &nb
原创 2015-10-20 13:43:26
692阅读
server {   ...      location / {          index  index.htm index.html 
转载 2017-11-06 13:19:46
496阅读
多个入口访问官方可以访问,访问后台就不行了,需要配置多入口 listen 80; server_name 172.30.164.199; index index.php index.html index.htm default.php default.htm default.html login.p
原创 2021-10-18 16:03:10
286阅读
直接记录配置如下 user  www; worker_processes  1; events {     worker_connections  1024; } http {     include   &n
原创 2015-07-10 14:50:04
456阅读
站点配置文件server   {       listen 80;       server_name  localhost 222.78.4.90;   &n
原创 2013-08-28 08:50:27
869阅读
thinkphp5在nginx环境下运行的时候默认是不支持通过index.php/index/index/index的形式去访问的,也不支持route,所以需要手动配置nginx使其支持。apache默认支持修改nginx配置文件找到你的thinkphp站点配置项,在其中的php项中如同下面配置windowslocation~\.php(.*)${fastcgi_pass127.0.0.1:90
原创 2019-08-28 13:25:06
1191阅读
在本次使用nginx发布vue项目遇到 配置location 始终404 和 在项目子目录点击浏览器刷新出现404问题使用nginx发布vue项目,为了方便测试就下载了一个nginx 放置自己目录下nginx目录是这样的一、配置端口然后打开conf / nginx.conf 配置 server,首选监听808 设置服务名listen 808; server_name localho
对应站点设置中,可修改访问网站的目录,修改nginx对应站点配置文件新增下面代码,即可完成重写路由,增加index.phplocation / {
原创 2022-06-06 17:49:33
2700阅读
尝试了好多次,总算找到可以用的配置文件了,记录下server { listen 80; server_name thinkphp.lo; root /var/www; index index.html index.htm index.php; error_page 404 /404.html; locat...
原创 2021-07-12 10:16:21
355阅读
尝试了好多次,总算找到可以用的配置文件了,记录下server { listen 80; server_name thinkphp.lo; root /var/www; index index.html index.htm index.php; error_page 404 /404.html; locat...
原创 2022-03-01 10:49:07
1004阅读
背景:做一个前后端分离的项目,使用vue-cli创建的前端项目,在前端配置跨域请求。一、开发阶段 在vue.config.js中配置devserver的proxy进行代理请求配置,然后将所有请求改为/api开头的即可。但是这样配置只在开发阶段起作用。所以在nginx上部署的时候,需要再重新配置请求代理。 vue.config.js中代码配置如下:// 相当于webpack-dev-server,对
配置nginx + https + node + vue为什么要配置这些,此时的我在捣鼓写的vue项目的demo玩,简单的调用摄像头并进行拍照,并将照片转换为base64字符串通过node服务存储到云服务器的mysql数据库里(并没有使用将图片上传至服务器的某个目录下,将云服务器的地址存储到数据库的方案。按道理应该要这样做的,这里只是简单的demo,不要被误解了,毕竟直接往数据库里存base64的
先说结论官方给出了nginx的解决方案location / { try_files $uri $uri/ /index.html; }1. 背景介绍vue项目只有一个组件,路由模式是history,路由中有一个根路径重定向配置,路由配置如下const routes = [ { path: '/', redirect: '/index' }, { path:
一.nginx配置文件结构Nginx配置文件是一个纯文本文件。整个配置文件以block形式组织。每个block以一个大括号“{”来表示。block可分为几个层次,整个配置文件中Main命令位于最高层,在Main层下面可以有Events、 HTTP等层级,而在HTTP层中又包含Server层,即server block,二.Nginx 服务的基本配置项详解nginx.conf配置文件主要分成四个部
标题# Windows下nginx部署vue配置(小白版)一、安装nginx1.安装选择nginx安装包直接解压即可(这个很简单,就不多做演示了)2.测试启动简单命令:启动命令: start nginx停止命令:nginx.exe -s stop修改配置文件后,需要重新加载配置文件内容时,无需停止,输入以下命令即可:nginx.exe -s reloadnginx默认端口为80,直接在浏览器地址栏
比如在一个项目中有前台与后台两个模块,需要使用不同的入口文件。同时希望前台使用默认的index.php的入口。 关键的配置如下: if (!-e $request_filename) {           rewrite /plugins.php(.*)$ /plugins.php?s=/$1 last;           rewrite /admin.php(.*)$ /admin.php?
php
转载 2018-12-26 14:25:00
152阅读
2评论
比如在一个项目中有前台与后台两个模块,需要使用不同的入口文件。同时希望前台使用默认的index.php的入口。关键的配置如下:if(!-e$request_filename){rewrite/admin.php(.*)$/admin.php$1last;rewrite^(.*)$/index.php/$1;break;}如果访问的后台入口文件就交给admin.php这个入口文件进行处理。其他情况交
转载 2019-03-04 09:28:24
1423阅读
代码】thinkphp5框架的nginx配置
原创 2022-08-14 00:34:55
214阅读
ThinkPHPNginx上的URL配置if (!-e $request_filename) { rewrite ^(.*)$ /index.php last;}
转载 2023-01-12 01:44:14
142阅读
  • 1
  • 2
  • 3
  • 4
  • 5