分类为 Nginx 的文章:
安装 brew install nginx 配置文件: /usr/local/etc/nginx/nginx.conf 用法: brew services info nginx brew services restart nginx brew services start nginx brew services stop nginx 安装日志: Docroot is: /usr/local/var/www The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that nginx can run without sudo. nginx will load all files in /usr/local/etc/ngin...
2023/04/17 浏览数(248) 分类(Nginx)
启用防火墙 systemctl start firewalld firewall-cmd --add-service=http --permanent firewall-cmd --add-service=https --permanent firewall-cmd --remove-port=3306/tcp --permanent firewall-cmd --reload 启用交换空间 swap 分区 dd if=/dev/zero of=/swapfile bs=1024k count=8192 mkswap /swapfile swapon /swapfile echo "/swapfile swap swap defaults 0 0" >> /etc/fstab 软件源 ...
2022/07/11 浏览数(301) 分类(CentOS/RockyLinux, MySQL/MariaDB, Nginx, PHP)
上接:Dell EMC PowerEdge T340 磁盘初始化 CentOS 7 (1708) 安装盘内置有 PHP5.4.16、Apache2.4.6 和 MariaDB15.1(MySQL5.5.56),如果能满足需要,可在装系统的同时一起安装(如下图),下文就不需要看了。 客户的服务器,禁止联网、禁止使用U盘,只能使用光驱。需要的 WEB 环境如下: CentOS-7-x86_64-DVD-1708.iso Nginx-1.18.0-1.el7.ngx.x86_64 MySQL-community-server-8.0.20-1.el7.x86_64 PHP-7.2w 下载 rpm 包 ...
2020/06/6 浏览数(966) 分类(Apache, CentOS/RockyLinux, Linux, MySQL/MariaDB, Nginx)
强烈建议不要直接在 Mac 上安装这些东西,而是使用 vagrant。Vagrant Boxes 下载页面 安装 brew install nginx php mysql # 安装的版本为 nginx-1.17.1、php-7.3.6、mysql-8.0.16 mysql_secure_installation # 初始化 mysql # “brew link php”时会报“/usr/local/sbin is not writable.”,网上办法是改权限,建议不要听、直接无视。 # Mac 自带有 php,需要修改环境变量优先使用 brew 安装的: export PATH=/usr/loca...
2019/07/16 浏览数(775) 分类(Apache, macOS, MySQL/MariaDB, Nginx, PHP)
效果如下 同一台服务器、同一个 Tomcat、同一个端口。 测试环境 服务器:192.168.0.249 CentOS 7.6.1810 tomcat-7.0.76-8.el7_5.noarch 客户机:192.168.0.179 DeepinLinux 15.8 桌面版 Google Chrome 70.0.3538.77 准备项目数据 创建第一个项目 /data/webapps/localhost/index.html,内容为: /data/webapps/localhost 创建第二个项目 /data/webapps/serverhost/index.html,内容为: second host 目录结构 /d...
2019/01/12 浏览数(1,930) 分类(Apache, CentOS/RockyLinux, Linux, Nginx, Windows)
Vue项目采用整站部署,不使用接口所在站点的二级目录或一级目录 目录结构 /webroot/ ├─ api.app.com/ │ ├─ public_html/ │ │ ├─ uploads/ │ │ └─ web.conf │ ├─ certs/ │ ├─ logs/ │ └─ rebots.txt └─ wechat.app.com/   ├─ public_html/   │ ├─ uploads/ <-- link   │ └─ index.html   ├─ certs/   ├─ logs/   └─ rebots.txt webpack dev server...
2018/12/7 浏览数(720) 分类(Apache, Nginx, Vue.js, Windows)
需求 访问 upall.cn/v1 时从 v1.upall.cn 获取内容 配置 server { listen 443; server_name upall.cn # # 其它代码…… # location ^~ /v1/ { proxy_pass http://v1.upall.cn/; client_max_body_size 0; proxy_connect_timeout 36000s; proxy_read_timeout 36000s; proxy_request_buffering off; } } <完>
2018/07/5 浏览数(1,344) 分类(Nginx)
letsencrypt.sh(GitHub) 是一个获取 Let’s Encrypt 免费90天 SSL 证书的脚本,它可以自动创建 let’s encrypt 帐号、生成 csr、获取 pem、crt 证书。 letsencrypt.sh 需要在网站根目录创建 .well-known 文件夹以验证域名所有权,但 seafile 的 seahub 使用 Django 提供 web 服务,直接在 seahub 根目录 seafile-server-latest/seahub/ 创建 .well-known 目录会出现 404,试过修改 seafile-server-latest/seahub/seah...
2017/09/29 浏览数(1,400) 分类(Nginx)
如果需要转移 seafile 到新的位置或者恢复 seafile 备份到另外一个位置,可以参考下边的内容操作。 需要修改两个位置: seafile-data 的位置 如果启用了 https 还需要修改 nginx 配置文件中 media 的目录位置 停止服务 cd /home/haiwen/seafile-server-latest ./seahub.sh stop # 停止 Seafile 进程 ./seafile.sh stop # 停止 Seahub 移动位置 mkdir /seafile mv /home/haiwen/* /seafile/ 修改配置文件 1/2. 编辑...
2017/09/7 浏览数(3,046) 分类(Nginx)
抽象来说,将 Nginx 配置为 Web 服务器就是定义处理哪些 URLS 和如何处理这些URLS 对应的请求。具体来说,就是定义一些虚拟服务器(Virtual Servers),控制具有特定 IP 和域名的请求。 更具体的来说, Nginx 通过定义一系列 locations 来控制对 URIS 的选择。每一个 location 定义了对映射到自己的请求的处理场景:返回一个文件或者代理请求,或者根据不同的错误代码返回不同的错误页面。另外,根据 URI 的不同,请求也可以被...
2016/12/1 浏览数(1,575) 分类(Nginx)
server { listen 80; server_name ws.repo; location / { proxy_pass http://127.0.0.1:3000/; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } } 或 upstream ws_server { server 127.0.0.1:3000; } server { listen 80; server_name ws.repo; location / { ...
2016/09/14 浏览数(1,522) 分类(Linux, Nginx, Windows)
CentOS7 的防火墙由 iptables 换成了 firewalld, 查看 firewalld 状态:systemctl status firewalld.service 关闭 firewalld:systemctl stop firewalld.service 配置文件:/etc/firewalld 允许 nginx: systemctl start firewalld.service firewall-cmd --add-service=http --permanent firewall-cmd --add-service=https --permanent # http 里没有包含 https firewall-cmd --add-port=8080/tcp --permanent #追加一个...
2016/08/18 浏览数(3,688) 分类(CentOS/RockyLinux, Nginx)
点击返回顶部
  1. 留言
  2. 联系方式