묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
nginx 에서 도메인 추가하는법좀 가르쳐주세요..
2014.02.28 02:32
/etc/nginx/conf.d
의 default.conf 파일을 고쳤습니다.
server { listen 80; root /home/site/public_html; server_name site.com www.site.com; include php.conf; include rewrite_xe.conf; include security.conf; location / { index index.php index.html index.htm; } location /files/attach { default_type application/octet-stream; location ~ \.php$ { break; } } deny 113.12.0.0/16; #location /cgi-bin { location ~ \.cgi|pl$ { gzip off; root /home/site/public_html; #fastcgi_pass unix:/var/run/nginx/cgiwrap-dispatch.sock; fastcgi_pass unix:/var/run/fcgiwrap.socket; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /home/site/public_html$fastcgi_script_name; } #location /ff { # include proxy.conf; # proxy_pass http://127.0.0.1:8000; #} } server { listen 80; root /home/sitetest/public_html; server_name test.site.com www.test.site.com; include php.conf; include rewrite_xe.conf; include security.conf; location / { index index.php index.html index.htm; } location /files/ { default_type application/octet-stream; location ~ \.php$ { break; } } deny 113.12.0.0/16; #location /cgi-bin { location ~ \.cgi|pl$ { gzip off; root /home/sitetest/public_html; #fastcgi_pass unix:/var/run/nginx/cgiwrap-dispatch.sock; fastcgi_pass unix:/var/run/fcgiwrap.socket; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /home/sitetest/public_html$fastcgi_script_name; } #location /ff { # include proxy.conf; # proxy_pass http://127.0.0.1:8000; #} } server { listen 80; root /home/sitetest2/public_html; server_name test2.site.com www.test2.site.com; include php.conf; include rewrite_xe.conf; include security.conf; location / { index index.php index.html index.htm; } location /files/ { default_type application/octet-stream; location ~ \.php$ { break; } } deny 113.12.0.0/16; #location /cgi-bin { location ~ \.cgi|pl$ { gzip off; root /home/sitetest2/public_html; #fastcgi_pass unix:/var/run/nginx/cgiwrap-dispatch.sock; fastcgi_pass unix:/var/run/fcgiwrap.socket; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /home/sitetest2/public_html$fastcgi_script_name; } #location /ff { # include proxy.conf; # proxy_pass http://127.0.0.1:8000; #} }
위와같이 설정했습니다.
site.com 은 원래 잘써왔구요
sitetest.com 은 예전에 저렇게 등록시켜놓고 있다가 이번에 서버에사용자추가하고 연결하니 잘되더라구요
근데
sitetest2.com 요놈이 말썽이네요 아무리 해도 안됩니다.. ㅜㅜ
혹시 추가로 더 해야할것이 있나요?
p.s dns설정은 다 해줬습니다 ㅜ.
.....하아..해결했습니다...nginx restart를 안해줫더라구요 멍청이같이 ㅜㅜ