nginx
差分
このページの2つのバージョン間の差分を表示します。
次のリビジョン | 前のリビジョン | ||
nginx [2020/01/16 21:05] – 作成 nabezo | nginx [2020/07/09 16:04] (現在) – [apach2のポート変更] nabezo | ||
---|---|---|---|
行 3: | 行 3: | ||
ubuntu18.04 | ubuntu18.04 | ||
sudo apt install nginx | sudo apt install nginx | ||
- | ===== 設定方法 | + | ====== proxyとして設定 ====== |
- | / | + | |
- | / | + | ===== nginxのproxy設定 ===== |
+ | /etc/nginx/sites-enabled/ | ||
+ | sudo rm / | ||
+ | /etc/ | ||
+ | server { | ||
+ | server_name www.xxxx.com; | ||
+ | location / { | ||
+ | proxy_set_header X-Forwarded-Proto $scheme; | ||
+ | proxy_set_header X-Forwarded-Host www.xxxx.com; | ||
+ | proxy_pass http:// | ||
+ | } | ||
+ | } | ||
- | ===== apach2 ===== | + | / |
+ | upstream proxybackend { | ||
+ | server localhost: | ||
+ | } | ||
+ | server { | ||
+ | listen 0.0.0.0: | ||
+ | server_name localhost; | ||
+ | location / { | ||
+ | proxy_pass http:// | ||
+ | } | ||
+ | } | ||
+ | nginx再起動 | ||
+ | sudo systemctl stop nginx | ||
+ | sudo systemctl start nginx | ||
+ | |||
+ | |||
+ | |||
+ | ===== apach2のポート変更 | ||
/ | / | ||
# | # | ||
| | ||
+ | ====== webdav設定 ====== | ||
+ | |||
+ | 403エラーが出る場合 | ||
+ | その他ユーザに実行権限が有るか確認する | ||
- | | ||
- | |
nginx.1579176351.txt.gz · 最終更新: 2020/01/16 21:05 by nabezo