padavan下载源
http://h5ppt.com/bin.entware.net/mipselsf-k3.4/
用winscp连接路由器后在/opt/etc/找到opkg.con
打开后将原来的地址换成上面的地址

如果没有/opt/var/run/nginx.pid看下面链接
谁掳走了 nginx.pid 文件?

nginx日志报错文件在/opt/var/log/nginx
参考文章
Nginx出现403 forbidden

下面开始安装nginx
首先opkg install nginx-extras
安装好后用winscp连接路由器
修改/opt/etc/nginx/nginx.conf中第一行user
将nobody 改成user admin root;

参考
https://blog.csdn.net/u011066470/article/details/122279857
https://www.right.com.cn/forum/thread-753365-1-1.html

/opt/etc/nginx/nginx.conf完整文件如下

user admin root;
worker_processes auto;
pid /opt/var/run/nginx.pid;
include /opt/etc/nginx/modules-enabled/*.conf;events {worker_connections 768;# multi_accept on;
}http {### Basic Settings##sendfile on;tcp_nopush on;tcp_nodelay on;keepalive_timeout 65;types_hash_max_size 2048;# server_tokens off;# server_names_hash_bucket_size 64;# server_name_in_redirect off;include /opt/etc/nginx/mime.types;default_type application/octet-stream;### SSL Settings##ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLEssl_prefer_server_ciphers on;### Logging Settings##access_log /opt/var/log/nginx/access.log;error_log /opt/var/log/nginx/error.log;### Gzip Settings##gzip on;gzip_disable "msie6";# gzip_vary on;# gzip_proxied any;# gzip_comp_level 6;# gzip_buffers 16 8k;# gzip_http_version 1.1;# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;### Virtual Host Configs##include /opt/etc/nginx/conf.d/*.conf;include /opt/etc/nginx/sites-enabled/*;
server {listen 81;server_name localhost;root /opt/share/www/;#index index.html index.htm index.php tz.php;location / {index  index.html index.htm index.php l.php;autoindex  off;}
}}#mail {#   # See sample authentication script at:
#   # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
#   # auth_http localhost/auth.php;
#   # pop3_capabilities "TOP" "USER";
#   # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#   server {#       listen     localhost:110;
#       protocol   pop3;
#       proxy      on;
#   }
#
#   server {#       listen     localhost:143;
#       protocol   imap;
#       proxy      on;
#   }
#}

打开opt/etc/nginx/sites-available
找到defalut文件双击打开后如下
修改listen 将原来的80改为81
最后在ssh界面启动nginx

/opt/etc/init.d/S80nginx start

参考文章
openwrt 安装nginx 冲突
Nginx 安装后 /etc/init.d/ 没有nginx 配置得启动服务
Nginx通过/etc/init.d/nginx方式启动或停止服务
启动Nginx出现Failed to start nginx.service:unit not found
斐讯K2P刷OpenWrt,并使用Nginx做服务,添加ssl

老毛子Padavan一键安装LNMP后部署自建网站教程(例子: mayswind的Aria-Ng新Web前端 )
修改nginx配置文件

打开/opt/etc/nginx/vhost复制一份配置

家用存储折腾之9-OpenWrt安装web环境(nginx+php)

老毛子固件ONMP自动覆盖NGINX配置怎么办
/opt/etc/nginx/vhost/default.conf修改后保存重启服务后还变成默认的,直接修改\opt\etc\nginx\nginx.conf这个配置还不会生效

opt/etc/nginx/sites-available完整文件如下

##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
### Default server configuration
#
server {listen 81 default_server;listen [::]:81 default_server;# SSL configuration## listen 443 ssl default_server;# listen [::]:443 ssl default_server;## Note: You should disable gzip for SSL traffic.# See: https://bugs.debian.org/773332## Read up on ssl_ciphers to ensure a secure configuration.# See: https://bugs.debian.org/765782## Self signed certs generated by the ssl-cert package# Don't use them in a production server!## include snippets/snakeoil.conf;root /opt/share/www;# Add index.php to the list if you are using PHPindex index.html index.htm index.nginx-debian.html;server_name _;location / {# First attempt to serve request as file, then# as directory, then fall back to displaying a 404.try_files $uri $uri/ =404;}# pass PHP scripts to FastCGI server##location ~ \.php$ {# include snippets/fastcgi-php.conf;##    # With php-fpm (or other unix sockets):#    fastcgi_pass unix:/opt/var/run/php7-fpm.sock;#  # With php-cgi (or other tcp sockets):# fastcgi_pass 127.0.0.1:9000;#}# deny access to .htaccess files, if Apache's document root# concurs with nginx's one##location ~ /\.ht {#  deny all;#}
}# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
#   listen 80;
#   listen [::]:80;
#
#   server_name example.com;
#
#   root /opt/share/www/example.com;
#   index index.html;
#
#   location / {
#       try_files $uri $uri/ =404;
#   }
#}

padavan解决没有u盘不能安装nginx问题相关推荐

  1. php空间搭建装网盘,编译安装Nginx和php搭建KodExplorer网盘

    编译安装Nginx和php搭建KodExplorer网盘 环境说明: 系统版本    CentOS 6.9 x86_64 软件版本    nginx-1.12.2        php-5.5.38  ...

  2. 解决:U盘无法安装到这个磁盘选中的磁盘具有MBR分区表

    选择安装到哪个盘下,这里问题可能就来了.在安装的时候可能出现"windows无法安装到这个磁盘.选中的磁盘具有MBR分区表,在EFI系统上,windows只能安到GPT磁盘."我当 ...

  3. linux环境手动编译安装Nginx实践过程 附异常解决

    linux环境手动编译安装Nginx实践过程 附异常解决 参考文章: (1)linux环境手动编译安装Nginx实践过程 附异常解决 (2)https://www.cnblogs.com/david9 ...

  4. 今天用pro安装nginx+php+mysql出现故障的解决方法

    今天用pro安装nginx+php+mysql出现故障的解决方法 by 伍雪颖 dyld: Library not loaded: @@HOMEBREW_CELLAR@@/openssl/1.0.1h ...

  5. U盘启动盘成功安装Ubuntu16.04(解决安装卡logo等问题)

    写在前面: 我的笔记本是华硕FX503VD.重装系统后,需要安装Ubuntu16.04来完成毕业设计,本来自己之前已经成功安装过,但是这次不知道为什么又卡在这里了,主要的问题还是U盘启动后,选择UEF ...

  6. 新版Dell电脑u盘启动安装ubuntu18找不到启动盘的解决办法

    1.首先根据[Rufus - 轻松创建USB启动盘]和[Alternative downloads | Ubuntu]下载ubuntu18.04对应ios并制作好usb启动盘. 2.开机时按F2进入B ...

  7. 服务器2008怎么系统盘为d盘,硬盘安装Windows Server 2008(解决系统盘符变成D盘)

    在winpe里面安装windows server 2008(非r2版),系统盘符会错乱,变成d盘,把它改回c盘会很复杂...由于要安装32位版本的系统,r2已经没有x86版本了.....不得不安装这个 ...

  8. [亲测] 私有云盘Nextcloud在nginx环境下安装(全流程)

    第一章 安装niginx + php 本文的默认环境(安装路径,配置路径,证书路径等),都继承于我的另一篇博文: [亲测]PHP Version 7.3.8 + Nginx 1.16.1 (100%无 ...

  9. centos7 安装 nginx(https) 及403错误解决方法

    1.检查并安装所需的依赖软件 1).gcc:nginx编译依赖gcc环境 安装命令:yum install gcc-c++ 2).pcre:(Perl Compatible Regular Expre ...

  10. linux下安装nginx出错,Ubuntu安装Nginx服务器出错解决

    Ubuntu安装Nginx服务器错误信息: ./configure: error: the HTTP rewrite module requires the PCRE library. You can ...

最新文章

  1. 用 FileZilla 连接 Amazon 的aws的主机
  2. Javascript之事件(一)
  3. spring boot系列03--spring security (基于数据库)登录和权限控制(下)
  4. POJ1151基本的扫描线求面积
  5. Cadence IC使用教程
  6. 从字节码层面分析==比较integer和int
  7. js连续指定两次或者多次的click事件(解决办法)
  8. 模拟生态圈_电源工程师必备求生技能——经典20种模拟电路
  9. 最大堆和最小堆和平衡二叉树_最小堆二叉树
  10. SQL从入门到不是怎么精通
  11. Inverting the Generator of a GAN 生成器反向
  12. 计算机读不出光盘,光驱读不出光盘,小编教你电脑光盘不能被识别怎么解决
  13. 还不会用 Python 提取 PDF 表格?三种类型数据,轻松转换成 Excel
  14. Python编程从入门到实践(第五章练习)
  15. 华宇(大连)笔试-20190620
  16. 类型的Overflow与underflow
  17. 淘宝店铺pc端代码详细解析
  18. PS从入门到精通第4节——祖传抠图技法
  19. 未解决:自行打包cpio格式的Ramdisk,与编译成功生成的kernel.bin,deviceTree一起打包成image.ub,不能正常启动kernel的问题???
  20. 图片上传流程前端上传文件后端保存文件并返回图片地址

热门文章

  1. 基于深度相机的下肢外骨骼的自适应梯级步态生成方法
  2. 随机过程(一):泊松过程的详细理解
  3. 如何改写(paraphrase)英文句子?
  4. ValueError: multiclass format is not supported
  5. ubuntu看不了bilibili视频
  6. pick out.php,pick_out.php
  7. 概率论与数理统计公式
  8. QNX Hypervisor —— 体系结构
  9. 云信IM服务端API调用(THINKPHP版)
  10. Oracle的 IT 世界观