【已完成】django项目,ip可以正常访问,域名访问报错404.
为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:9.1.0系统版本:centos7
问题描述:django项目,使用IP地址可以访问,但是使用域名访问报错404,域名已解析,外网映射已开启,
相关截图(日志、错误):
请大佬指点一下,谢谢
以下是nginx配置
userwww www;
worker_processes auto;
error_log/www/wwwlogs/nginx_error.logcrit;
pid /www/server/nginx/logs/nginx.pid;
worker_rlimit_nofile 51200;
stream {
log_format tcp_format '$time_local|$remote_addr|$protocol|$status|$bytes_sent|$bytes_received|$session_time|$upstream_addr|$upstream_bytes_sent|$upstream_bytes_received|$upstream_connect_time';
access_log /www/wwwlogs/tcp-access.log tcp_format;
error_log /www/wwwlogs/tcp-error.log;
include /www/server/panel/vhost/nginx/tcp/*.conf;
}
events
{
use epoll;
worker_connections 51200;
multi_accept on;
}
http
{
include mime.types;
#include luawaf.conf;
include proxy.conf;
default_typeapplication/octet-stream;
server_names_hash_bucket_size 512;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 50m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
gzip on;
gzip_min_length1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/json image/jpeg image/gif image/png font/ttf font/otf image/svg+xml application/xml+rss text/x-js;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE \.";
limit_conn_zone $binary_remote_addr zone=perip:10m;
limit_conn_zone $server_name zone=perserver:10m;
server_tokens off;
access_log off;
server
{
listen 888;
server_name phpmyadmin;
index index.html index.htm index.php;
root/www/server/phpmyadmin;
#error_page 404 /404.html;
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
access_log/www/wwwlogs/access.log;
}
include /www/server/panel/vhost/nginx/*.conf;
}
请大佬指点一下,谢谢
server_name 152.136.38.75 中国安全帽网址; 改成server_name 152.136.38.75 xn--fiqq2fqugbnf50d.xn--ses554g;试试 天天进步 发表于 2024-9-5 10:39
server_name 152.136.38.75 中国安全帽网址; 改成server_name 152.136.38.75 xn--fiqq2fqugbnf50d.xn--ses5 ...
谢谢大佬,第一次搞中文域名,按照您的方法已经解决了 按照大佬提醒,重新配置了域名,问题已解决,英文域名可以直接填,中文域名需要使用转换后再填。 问题解决了就好,这边就直接闭贴了,后续有面板使用问题可以在开新帖呢,这边就闭贴了,祝您生活愉快
页:
[1]