clarkwinkelmann So, I installed it at/home/username/flarum2/
. The nginx.config file in THAT directory is:
# Pass requests that don't refer directly to files in the filesystem to index.php
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# Uncomment the following lines if you are not using a `public` directory
# to prevent sensitive resources from being exposed.
# <!-- BEGIN EXPOSED RESOURCES PROTECTION -->
# location ~* ^/(\.git|composer\.(json|lock)|auth\.json|config\.php|flarum|storage|vendor) {
# deny all;
# return 404;
# }
# <!-- END EXPOSED RESOURCES PROTECTION -->
# The following directives are based on best practices from H5BP Nginx Server Configs
# https://github.com/h5bp/server-configs-nginx
# Expire rules for static content
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
add_header Cache-Control "max-age=0";
}
location ~* \.(?:rss|atom)$ {
add_header Cache-Control "max-age=3600";
}
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc)$ {
add_header Cache-Control "max-age=2592000";
access_log off;
}
location ~* \.(?:css|js)$ {
add_header Cache-Control "max-age=31536000";
access_log off;
}
location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ {
add_header Cache-Control "max-age=2592000";
access_log off;
}
# Gzip compression
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types
application/atom+xml
application/javascript
application/json
application/ld+json
application/manifest+json
application/rss+xml
application/vnd.geo+json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/bmp
image/svg+xml
image/x-icon
text/cache-manifest
text/css
text/javascript
text/plain
text/vcard
text/vnd.rim.location.xloc
text/vtt
text/x-component
text/x-cross-domain-policy;
Unless you meant the flarum.config file in /etc/nginx/sites-available/
, which is the actual server info where I put my site URL. I feel like I am so close. Current site is just Hugo + GitHub Pages on my domain. Also, when trying right now to stop or restart my NGINX server, I am getting: "Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details." It allowed me to stop it, though.
If I do nginx -t
or sudo nginx
then I get:
nginx: [emerg] "gzip" directive is duplicate in /home/username/flarum2/.nginx.conf:43
nginx: configuration file /etc/nginx/nginx.conf test failed
If I get rid of the gzip stuff, I get:
nginx: [emerg] duplicate location "/" in /home/username/flarum2/.nginx.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed
Line 2 is the "location" line in:
# Pass requests that don't refer directly to files in the filesystem to index.php
location / {
try_files $uri $uri/ /index.php?$query_string;
}
I feel like all I need to do is restart NGINX server and now this. Never had an issue with NGINX before....always something Ok, fixed that by deleting a config file in /etc/nginx/sites-enabled
.
I guess NGINX is started back since it's showing the welcome page again, but still no Flarum.....