nginx.conf
worker_processes 1; events { worker_connections 1024; } http { server { listen 8080; root /data/up1; location / { } } server { location / { proxy_pass http://localhost:8080; } location /www { root /data; } location /images/ { root /data; } location ~ \.(gif|jpg|png)$ { root /data/images; } } }
重新载入配置文件:
/usr/local/nginx/sbin/nginx -s reload # 重新载入配置文件
访问:
http://loc168/ http://loc168/images/estunLogo.png × http://loc168/estunLogo.png http://loc168/www/
创建资源:
标签:http,代理服务,loc168,root,nginx,location,data From: https://www.cnblogs.com/ooo0/p/17587226.html