How to place .htacces in Ghost

0

I'm trying to add gzip compression to my project of Ghost.org but I could not, I use ghost-cli and nginx to serve, but in sites-available generates a proxy that sends a node that runs in localhost, this is the configuration of the nginx

server {

server_name latribu.mx www.latribu.mx;
root /var/www/latribu.mx/html/system/nginx-root;

location / {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $http_host;
    proxy_pass http://127.0.0.1:2368;

}

location ~ /.well-known {
    allow all;
}

client_max_body_size 50m;

listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/latribu.mx/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/latribu.mx/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

server {
if ($host = latribu.mx) {
    return 301 https://$host$request_uri;
} # managed by Certbot

if ($host = www.latribu.mx) {
    return 301 https://$host$request_uri;
} # managed by Certbot

listen 80;
listen [::]:80;

server_name latribu.mx www.latribu.mx;
return 404; # managed by Certbot
}

How can I add a .htacces to my project

    
asked by Antony999k 11.06.2018 в 04:19
source

1 answer

1

.htaccess is an apache configuration file, for nginx there are directives in the configuration, for example:

/etc/nginx/nginx.conf

gzip            on;
gzip_min_length 1000;
gzip_proxied    expired no-cache no-store private auth;
gzip_types      text/plain application/xml;

Then you restart the server

$ sudo service nginx restart

link

    
answered by 11.06.2018 в 05:15