解决无法使用http访问安装好nginx和ftp的图片服务器的问题
来源:互联网 发布:潮汕话输入法软件 编辑:程序博客网 时间:2024/06/06 05:27
出现该问题的原因是nginx.conf文件中没有修改
需要将标红的部分改为访问图片服务器的根目录(/home/ftpuser)
user root;#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 1024;}http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root html; #将 标红的部分 改为 /home/ftpuser index index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #}}
阅读全文
0 0
- 解决无法使用http访问安装好nginx和ftp的图片服务器的问题
- 解决nginx无法显示图片的问题
- nginx和ftp图片服务器的搭建记录
- nginx和ftp图片服务器的搭建记录
- ftp+nginx 图片服务器的搭建
- ubuntu下ftp服务器的安装和访问(转)
- linux 下nginx+ftp搭建图片服务器在本机访问出现403错误的解决办法
- 【Ts 3】Nginx的Http(图片)服务器配置+ftp上传使用说明
- 解决JBOSS服务器无法通过IP访问的问题
- 解决JBOSS服务器无法通过IP访问的问题
- 解决JBOSS服务器无法通过IP访问的问题
- 解决JBOSS服务器无法通过IP访问的问题
- 腾讯云服务器完美解决无法使用公网IP访问的问题
- 解决服务器80端口监听异常导致无法打开和访问网站的问题
- linux FTP服务器访问权限的问题
- 下载普通http连接的图片和ftp服务器的图片
- 解决IE无法打开FTP的问题
- nginx服务器配置ftp服务器图片访问根目录
- 设计模式之单例模式
- 关注民生民情
- [LintCode]97.二叉树的最大深度
- 公钥与私钥-数字签名是什么?
- mybatis 一对多和多对一
- 解决无法使用http访问安装好nginx和ftp的图片服务器的问题
- POJ 3321 Apple Tree (树状数组)
- 2017.8.19-----ccpc小试
- 关注民生民情
- CrossWord of AM training
- 什么是JavaBean
- android-检测是否在模拟器中运行
- Xshell-Win系统往Linxu传输文件
- 关注民生民情