묻고답하기

안녕하세요 오늘 apache에서 nginx 로 변경하는 작업을 진행하였습니다.

www.dhsquare.net --> html파일 정상적으로 열림

www.dhsquare.net/zero --> XE 소스만 보임

 

 

일단 제가 설정한 값을 보여드리겠습니다.

 

--> vi /etc/nginx/nginx.conf

 

#user  root;
worker_processes  100;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
        server_names_hash_bucket_size 64;
        server {
        location / {
        index index.html index.htm index.php index.js index.jsp;
        #try_files $uri $uri/ /index.php?query_string;
        root /var/www/golbkim;
}
location ~ /.php$ {
        root php;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /var/www/golbkim/zero/index.php;
        include fastcgi_params;
}


        listen 80;
        server_name www.dhsquare.net;
}

 

#       server {
#       location / {
#       root /var/www/golbkim/zero;
#}
#        listen 80;
#       server_name zero.dhsquare.net;
#        index index.php;
#}

 

    include       /etc/nginx/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  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    gzip  on;

    include /etc/nginx/conf.d/*.conf;
#    include /etc/nginx/nginx.conf;
}

 

 

 

이렇게 설정했습니다.

나름 인터넷에서 찾아보고 php설정까지도 해줬구요 php-fpm 설정도 해주고 데몬실행도 다 해주었습니다.

 

한쪽은 XE를 한쪽은 워드프레스를 설치해놓았는데요 모두 들어가보면

index.php의 소스파일만 보입니다.

 

아시는 분 있으시면 알려주세요

 

감사합니다.

 

 

 

"/etc/nginx/nginx.conf" 78L, 1

태그 연관 글
  1. [2015/05/13] 묻고답하기 DB자동백업 XE에서도 될까요?.... by GT네오 *1