/tmp/passenger-standalone.kit8cq/nginx.conf

Jmnote (토론 | 기여)님의 2021년 10월 16일 (토) 13:26 판 (새 문서: ==개요== ;/tmp/passenger-standalone.kit8cq/nginx.conf <syntaxhighlight lang='aconf'> ########################################################################## # Passenger Standa...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

개요

/tmp/passenger-standalone.kit8cq/nginx.conf
##########################################################################
#  Passenger Standalone is built on the same technology that powers
#  Passenger for Nginx, so any configuration option supported by Passenger
#  for Nginx can be applied to Passenger Standalone as well. You can do
#  this by direct editing the Nginx configuration template that is used by
#  Passenger Standalone.
#
#  This file is the original template. DO NOT EDIT THIS FILE DIRECTLY.
#  Instead, make a copy of this file and pass the `--nginx-config-template`
#  parameter to Passenger Standalone.
#
#  Learn more about using the Nginx configuration template at:
#  https://www.phusionpassenger.com/library/config/standalone/intro.html#nginx-configuration-template
#
#  *** NOTE ***
#  If you customize the template file, make sure you keep an eye on the
#  original template file and merge any changes. New Phusion Passenger
#  features may require changes to the template file.
##############################################################

master_process on;
daemon on;

error_log '/opt/bitnami/discourse/log/passenger.3000.log' ;
pid '/opt/bitnami/discourse/passenger.3000.pid';

worker_shutdown_timeout 10;

        user discourse discourse;


worker_processes 1;
events {
    worker_connections 4096;
}

http {
    log_format debug '[$time_local] $msec  "$request" $status conn=$connection sent=$bytes_sent body_sent=$body_bytes_sent';
    include '/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/passenger-6.0.10/resources/mime.types';

    passenger_root '/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/passenger-6.0.10';
    passenger_abort_on_startup_error on;
    passenger_ctl pidfiles_to_delete_on_exit '["/tmp/passenger-standalone.kit8cq/temp_dir_toucher.pid"]';
    passenger_ctl integration_mode standalone;
    passenger_ctl standalone_engine nginx;
    passenger_user_switching off;

            passenger_ruby /opt/bitnami/ruby/bin/ruby;

            passenger_user discourse;
            passenger_default_user discourse;

    passenger_log_level 3;


    ### BEGIN your own configuration options ###
    # This is a good place to put your own config
    # options. Note that your options must not
    # conflict with the ones Passenger already sets.
    # Learn more at:
    # https://www.phusionpassenger.com/library/config/standalone/intro.html#nginx-configuration-template

    ### END your own configuration options ###

    default_type application/octet-stream;
    types_hash_max_size 2048;
    server_names_hash_bucket_size 64;
    client_max_body_size 1024m;
    access_log off;
    keepalive_timeout 60;
    underscores_in_headers on;
    gzip on;
    gzip_comp_level 3;
    gzip_min_length 150;
    gzip_proxied any;
    gzip_types text/plain text/css text/json text/javascript
        application/javascript application/x-javascript application/json
        application/rss+xml application/vnd.ms-fontobject application/x-font-ttf
        application/xml font/opentype image/svg+xml text/xml;




    server {
        server_name _;

            listen 0.0.0.0:3000;

            root '/opt/bitnami/discourse/public';

        passenger_app_root '/opt/bitnami/discourse';
        passenger_enabled on;

        passenger_app_env 'production';

        passenger_spawn_method 'direct';

        passenger_load_shell_envvars off;

        # Rails asset pipeline & webpacker support.
        location ~ "^/(assets|packs)/.+-([0-9a-f]{32}|[0-9a-f]{64}|[0-9a-f]{20}|[0-9a-f]{8})\..+" {
            error_page 490 = @static_asset;
            error_page 491 = @dynamic_request;
            recursive_error_pages on;

            if (-f $request_filename) {
                return 490;
            }
            if (!-f $request_filename) {
                return 491;
            }
        }
        location @static_asset {
            gzip_static on;
            expires max;
            add_header Cache-Control public;
            add_header ETag "";
        }
root@discourse-test-75cb7fb676-29xkv:/# cat /tmp/passenger-standalone.kit8cq/nginx.conf
            passenger_enabled on;
        }


        ### BEGIN your own configuration options ###
        # This is a good place to put your own config
        # options. Note that your options must not
        # conflict with the ones Passenger already sets.
        # Learn more at:
        # https://www.phusionpassenger.com/library/config/standalone/intro.html#nginx-configuration-template

        ### END your own configuration options ###
    }
    passenger_pre_start http://0.0.0.0:3000/;



}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}