0

Im trying to setup two sites on my nginx server.

  1. pma (phpmyadmin) works as it should.
  2. myhome.domain.tld - dosnt work.

here is the nginx.conf file.

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
    worker_connections 768;
    # multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_tokens off;

    server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

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

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;
    gzip_disable "msie6";

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # Virtual Host Configs
    ##
server {
listen 443 ssl http2;
    server_name pma.domain.tld; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/pma.domain.tld/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/pma.domain.tld/privkey.pem; # managed by Certbot
  include snippets/ssl-params.conf;
  client_max_body_size 40M;
  server_tokens off;
  root /srv/phpmyadmin/;

  index index.html index.php index.htm;


  location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }
include /etc/nginx/apps/*;

  location ~ /\.ht {
    deny all;
  }

add_header Strict-Transport-Security "max-age=31536000" always; # managed by Certbot

}
server {
listen 443 ssl http2;
      server_name myhome.domain.tld; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/myhome.domain.tld/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/myhome.domain.tld/privkey.pem; # managed by Certbot
  include snippets/ssl-params.conf;
  client_max_body_size 40M;
  server_tokens off;
  root /srv/myhome/;

  index index.html index.php index.htm;

  location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }
include /etc/nginx/apps/*;

  location ~ /\.ht {
    deny all;
  }

add_header Strict-Transport-Security "max-age=31536000" always; # managed by Certbot


    }
}
2
  • Anyone! - help???
    – sbh7600
    Nov 2, 2019 at 19:52
  • "Doesn't work" - Please edit your question to give specific details about the steps you are taking and issues you are encountering (exact error messages, etc.). Nov 3, 2019 at 2:11

0

You must log in to answer this question.

Browse other questions tagged .