I'm on Namecheap VPS hosting enviroment. Running on ubuntu 18, latest Nginx, PHP and laravel.
I have tried several configuration by testing with etc/nginx/nginx.conf and etc/nginx/sites-available/domainname.com.conf after making changes reload the nginx, but nothing can seems to fix by problem.
nginx.conf
user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
multi_accept on;
worker_connections 1024;
}
http {
charset utf-8;
#sendfile on;
#tcp_nopush on;
#tcp_nodelay on;
#server_tokens off;
#log_not_found off;
#types_hash_max_size 2048;
#client_max_body_size 16M;
#include mime.types;
#default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log warn;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
# Diffie-Hellman parameter for DHE ciphersuites
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
# Mozilla Intermediate configuration
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
# OCSP Stapling
ssl_stapling on;
ssl_stapling_verify on;
#resolver 1.1.1.1 1.0.0.1 8.8.8.8 8.8.4.4 208.67.222.222 208.67.220.220 valid=60s;
resolver_timeout 2s;
# Load configs
#include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
#include /etc/nginx/conf-enabled/*.conf;
}
domainname.com.conf
upstream php-handler {
server 127.0.0.1:9000;
#server unix:/var/run/php/php7.2-fpm.sock;
}
server {
# listen 80;
# listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
server_name domainname.com www.domainname.com;
#set $base ;
root /var/www/html/;
# SSL
ssl_certificate /etc/letsencrypt/live/www.domainname.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.domainname.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/www.domainname.com/chain.pem;
# security
include nginxconfig.io/security.conf;
# logging
access_log /var/log/nginx/domainname.com.access.log;
error_log /var/log/nginx/domainname.com.error.log warn;
# index.php
index index.php index.html index.htm index.nginx-debian.html;
# index.php fallback
#location / {
# try_files $uri $uri/ /index.php?$query_string;
#}
# additional config
include nginxconfig.io/general.conf;
include nginxconfig.io/letsencrypt.conf;
# handle .php (try_files syntax very important!)
location ~ \.php$ {
try_files $uri $uri/ /index.php?q=$uri&$args;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$; #this line
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
include /etc/nginx/mime.types;
}
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463";
# Add headers to serve security related headers (It is intended to
# have those duplicated to the ones above)
# Before enabling Strict-Transport-Security headers please read into
# this topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
add_header Referrer-Policy no-referrer;
# Optional: Don't log access to assets
# access_log off;
}
}
# non-www, subdomains redirect
#server {
# listen 443 ssl;
# listen [::]:443 ssl;
# server_name 199.192.30.222;
# SSL
ssl_certificate /etc/letsencrypt/live/www.domainname.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.domainname.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/www.domainname.com/chain.pem;
# return 301 https://www.domainname.com$request_uri;
#}
I have PHP code that using CSS formatting to display web pages.
the web page menu title should display as a table for example:
column 1 column 2 column 3 column 4
but instead it is display as
column 1
column 2
column 3
column 4
I have check every logs, from the nginx, and laravel, there is no errors registered with this problem.
how should I go about this?
any help would be greatly appreciated.
Thanks Lica.
Aucun commentaire:
Enregistrer un commentaire