odoo에 대한 역방향 서버 구성으로 nginx

不言
풀어 주다: 2023-03-25 09:02:02
원래의
3666명이 탐색했습니다.

이 글은 주로 odoo의 리버스 서버인 nginx의 구성을 소개합니다. 이제 특정 참고 가치가 있으므로 필요한 친구들이 참고할 수 있습니다

nginx 설치 가이드.

웹 서버 nginx를 odoo의 리버스 프록시 서버로 사용하면 다음과 같은 장점이 있습니다.

1 웹 페이지의 정적 콘텐츠를 캐시하고 웹 페이지 로딩 속도를 높입니다.

2. 분산 배포 시 서버의 성능 한계를 극복할 수 있는 데이터 배포에 nginx를 사용합니다.

3. 서버에 포트 80을 공유해야 하는 여러 웹 서비스(예: apache 및 odoo를 동시에)가 있는 경우 nginx를 역방향 프록시 서버로 사용하여 방문한 도메인 이름에 따라 데이터를 배포할 수 있습니다. 사용자.

nginx.conf 구성 파일을 수정하세요.

다음

#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;  #开启gzip,加快oe首页的加载速度。    server {
        listen       80;   #监听80端口
        server_name  59.110.222.158;  #

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            proxy_pass http://59.110.222.158:8069;    #反向代理服务器的ip:端口
            proxy_set_header X-Real-Ip $remote_addr;
            proxy_set_header X-Forwarded-For $remote_addr;
        }
        #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;
    #    }
    #}

}
로그인 후 복사

효과:


관련 권장 사항:

PHP 배포 nginx 구성 정보

nginx 구성 PHP 문제 해결

위 내용은 odoo에 대한 역방향 서버 구성으로 nginx의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!