Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

got "unexpected token" with the follow nginx config file at line 45 ("text/css") #30

Open
CaryChy opened this issue Nov 15, 2023 · 1 comment
Labels
bug Something isn't working v2 issues that would be fixed in v2 only

Comments

@CaryChy
Copy link

CaryChy commented Nov 15, 2023

worker_processes 1;

events {

    worker_connections 1024;
}

## rtmp {
## 
##     server {
## 
##         listen 10935;
## 
##         application live {
## 
##             live on;
##         }
## 
##         application hls {
## 
##             live on;
##             hls on;
##             hls_path temp/hls;
##             hls_fragment 8s;
##         }
##     }
## }

http {

    include mime.types;
    default_type application/octet-stream;

    sendfile on;
    keepalive_timeout 65;
    # Enable Gzip
    gzip on;
    gzip_http_version 1.0;
    gzip_comp_level 2;
    gzip_min_length 1100;
    gzip_buffers 4 8k;
    gzip_proxied any;
    gzip_types
    # text/html is always compressed by HttpGzipModule
    text/css
    text/javascript
    text/xml
    text/plain
    text/x-component
    application/javascript
    application/json
    application/xml
    application/rss+xml
    font/truetype
    font/opentype
    application/vnd.ms-fontobject
    image/svg+xml;

    gzip_static on;

    gzip_proxied expired no-cache no-store private auth;
    gzip_disable "MSIE [1-6]\.";
    gzip_vary on;

	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;
    access_log off;

    client_max_body_size 20m;
    server {

        listen 4600;

        server_name platform_style;
		
		proxy_buffer_size 1024k;
		proxy_buffers 16 1024k;
		proxy_busy_buffers_size 2048k;
		proxy_temp_file_write_size 2048k;
		
      
        location /platform/ {

            proxy_pass http://127.0.0.1:5000/platform/;
        }
		
		## location /stat {
		## 
        ##     rtmp_stat all;
        ##     rtmp_stat_stylesheet stat.xsl;
        ## }

        location /stat.xsl {

            root html;
        }

        location /hls {

            #server hls fragments
            types {

                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
            }
            alias temp/hls;
            expires -1;
        }
		
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {

            root html;
        }
        	
    }
	

}
@CaryChy
Copy link
Author

CaryChy commented Nov 15, 2023

seems this issue was caused by line 43 ("gzip_types") ends without ";"

@tufanbarisyildirim tufanbarisyildirim added the bug Something isn't working label Nov 16, 2023
@tufanbarisyildirim tufanbarisyildirim added the v2 issues that would be fixed in v2 only label Dec 23, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working v2 issues that would be fixed in v2 only
Projects
None yet
Development

No branches or pull requests

2 participants