这是我在nginx.conf
文件上写的内容。此文件中目前有两个server
类别,分别是Redmine和MediaWiki。
38 server {
39 listen 80;
40 server_name wiki.mypage.com;
41 root /var/www/html/mediawiki;
42
43 location / {
44 index index.php;
45 error_page 404 = @mediawiki;
46 }
47
48 access_log /var/log/nginx/access-wiki.log;
49 error_log /var/log/nginx/error-wiki.log;
50
51 charset utf-8;
52 passenger_enabled on;
53 client_max_body_size 50m;
54 }
55
56 server {
57 listen 80;
58 server_name redmine.mypage.com;
59
60 #charset koi8-r;
61 charset utf-8;
62 passenger_enabled on;
63 client_max_body_size 50m;
64
65 #access_log logs/host.access.log main;
66
67 location / {
68 root /var/www/redmine/public;
69 index index.html index.htm;
70 }
71
72 #error_page 404 /404.html;
73
74 # redirect server error pages to the static page /50x.html
75 #
76 error_page 500 502 503 504 /50x.html;
77 location = /50x.html {
78 root html;
79 }
80
81 # proxy the PHP scripts to Apache listening on 127.0.0.1:80
82 #
83 #location ~ \.php$ {
84 # proxy_pass http://127.0.0.1;
85 #}
86
87 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
88 #
89 #location ~ \.php$ {
90 # root html;
91 # fastcgi_pass 127.0.0.1:9000;
92 # fastcgi_index index.php;
93 # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
94 # include fastcgi_params;
95 #}
96
97 # deny access to .htaccess files, if Apache's document root
98 # concurs with nginx's one
99 #
100 #location ~ /\.ht {
101 # deny all;
102 #}
103 }
当我重新启动Nginx并尝试访问每个网页(wiki.mypage.com和redmine.mypage.com)时,我只设法访问了redmine。
配置本身是否有问题,或者我应该查看其他文件?