nginx loads the default page despite my proxy_pass configuration

This should be a very straight forward nginx configuration I would think, but it will only show me the default nginx homepage. I’ve even deleted the default file from /etc/nginx/sites-* to avoid having it possibly interfere at all.

I have the following file in /etc/nginx/sites-available/my.domain:

server {
    listen 80;
    listen [::]:80;

    location / {
        proxy_set_header        Host $host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto $scheme;
        proxy_pass              http://localhost:3000/;
        proxy_read_timeout      90;

I have the following symlink in sites-enabled:

my.domain -> /etc/nginx/sites-available/my.domain

I have checked that my configuration seems to be all right with nginx -t and reloaded it with nginx -s reload.

nginx -T outputs the following and I don’t see anything wrong with it:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
# configuration file /etc/nginx/nginx.conf:
user www-data;
worker_processes auto;
pid /run/;
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 TLSv1.3; # 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_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

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;

#mail {
#   # See sample authentication script at:
#   #
#   # auth_http localhost/auth.php;
#   # pop3_capabilities "TOP" "USER";
#   # imap_capabilities "IMAP4rev1" "UIDPLUS";
#   server {
#       listen     localhost:110;
#       protocol   pop3;
#       proxy      on;
#   }
#   server {
#       listen     localhost:143;
#       protocol   imap;
#       proxy      on;
#   }

# configuration file /etc/nginx/modules-enabled/50-mod-http-image-filter.conf:
load_module modules/;

# configuration file /etc/nginx/modules-enabled/50-mod-http-xslt-filter.conf:
load_module modules/;

# configuration file /etc/nginx/modules-enabled/50-mod-mail.conf:
load_module modules/;

# configuration file /etc/nginx/modules-enabled/50-mod-stream.conf:
load_module modules/;

# configuration file /etc/nginx/mime.types:

types {
    text/html                             html htm shtml;
    text/css                              css;
    text/xml                              xml;
    image/gif                             gif;
    image/jpeg                            jpeg jpg;
    application/javascript                js;
    application/atom+xml                  atom;
    application/rss+xml                   rss;

    text/mathml                           mml;
    text/plain                            txt;
    text/      jad;
    text/vnd.wap.wml                      wml;
    text/x-component                      htc;

    image/png                             png;
    image/tiff                            tif tiff;
    image/vnd.wap.wbmp                    wbmp;
    image/x-icon                          ico;
    image/x-jng                           jng;
    image/x-ms-bmp                        bmp;
    image/svg+xml                         svg svgz;
    image/webp                            webp;

    application/font-woff                 woff;
    application/java-archive              jar war ear;
    application/json                      json;
    application/mac-binhex40              hqx;
    application/msword                    doc;
    application/pdf                       pdf;
    application/postscript                ps eps ai;
    application/rtf                       rtf;
    application/         m3u8;
    application/              xls;
    application/         eot;
    application/         ppt;
    application/vnd.wap.wmlc              wmlc;
    application/  kml;
    application/      kmz;
    application/x-7z-compressed           7z;
    application/x-cocoa                   cco;
    application/x-java-archive-diff       jardiff;
    application/x-java-jnlp-file          jnlp;
    application/x-makeself                run;
    application/x-perl                    pl pm;
    application/x-pilot                   prc pdb;
    application/x-rar-compressed          rar;
    application/x-redhat-package-manager  rpm;
    application/x-sea                     sea;
    application/x-shockwave-flash         swf;
    application/x-stuffit                 sit;
    application/x-tcl                     tcl tk;
    application/x-x509-ca-cert            der pem crt;
    application/x-xpinstall               xpi;
    application/xhtml+xml                 xhtml;
    application/xspf+xml                  xspf;
    application/zip                       zip;

    application/octet-stream              bin exe dll;
    application/octet-stream              deb;
    application/octet-stream              dmg;
    application/octet-stream              iso img;
    application/octet-stream              msi msp msm;

    application/vnd.openxmlformats-officedocument.wordprocessingml.document    docx;
    application/vnd.openxmlformats-officedocument.spreadsheetml.sheet          xlsx;
    application/vnd.openxmlformats-officedocument.presentationml.presentation  pptx;

    audio/midi                            mid midi kar;
    audio/mpeg                            mp3;
    audio/ogg                             ogg;
    audio/x-m4a                           m4a;
    audio/x-realaudio                     ra;

    video/3gpp                            3gpp 3gp;
    video/mp2t                            ts;
    video/mp4                             mp4;
    video/mpeg                            mpeg mpg;
    video/quicktime                       mov;
    video/webm                            webm;
    video/x-flv                           flv;
    video/x-m4v                           m4v;
    video/x-mng                           mng;
    video/x-ms-asf                        asx asf;
    video/x-ms-wmv                        wmv;
    video/x-msvideo                       avi;

# configuration file /etc/nginx/sites-enabled/my.domain:
server {
    listen 80;
    listen [::]:80; 

    location / {
    proxy_set_header        Host $host;
    proxy_set_header        X-Real-IP $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header        X-Forwarded-Proto $scheme;
    proxy_pass              http://localhost:3000/;
    proxy_read_timeout      90;

What am I missing here? Is there some default configuration that’s overriding what I’ve set up?

ubuntu – Apache server not responding. It just loads and then gives a timeout

I have an apache2 server and have been trying to make it accessible to all but am unable to do so.
Here are the outputs:

$ netstat -plant | grep apache
tcp        0      0    *               LISTEN    15647/apache2

earlier it was :::80, but I changed it after seeing another post on

$ ufw status
Status: inactive
$ service apache2 status
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-08-28 18:33:05 UTC; 16min ago
    Process: 15625 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 15647 (apache2)
      Tasks: 55 (limit: 4617)
     Memory: 12.5M
     CGroup: /system.slice/apache2.service
             ├─15647 /usr/sbin/apache2 -k start
             ├─15648 /usr/sbin/apache2 -k start
             └─15649 /usr/sbin/apache2 -k start

Aug 28 18:33:05 localhost systemd(1): Starting The Apache HTTP Server...
Aug 28 18:33:05 localhost systemd(1): Started The Apache HTTP Server.

When I try to access it from browser, it just keeps on oading and after some point gives site takes too long to respond error.

Please help me resolve it. Also if any other output will be required, please inform me.

javascript – Is SEO affected by CSS or JS that hides content after a few seconds after the page loads?

I was instructed to implement a “filter” in some pages on a corporate website, the filter hides the page content and ask for a valid email to continue reading. Sort of an opt-in but forced, if visitor does not enter an email (that will be validated in real time) there will be no further changes, the visitor must click on a link to exit. After researchig a little, I come to the conclusion that crawlers will not read/index these pages so all the good SEO will be lost. My question is: if the page is shown in full, for some seconds, before the opt-in form displays, the crawlers (Google) will see this page as a public, readable page?

I asked this same question to support @OptinMonster, the developers of the software, according to them, content that is hidden by CSS is readable by Google. Other sources claim the opposite, indeed this kind of content can be “penalized”.

wordpress – Link points to jpg but loads html?

I don’t understand how the images in this blog open an html page instead of just loading the image file.

I’m trying to mirror the site with HTTrack but it only saves a html file and no binary data of the image, which makes me all the more confused. I tried some mime types without success.

tilemap – Pytmx loads no tiles or textures, it seems

So, I’ve been trying to load a tmx file through pytmx But when it loads the file, it only loads a black image with the same resolution as the tmx file.

class TiledMap:
    def __init__(self,filename):
        file = load_pygame(filename,pixelalpha=True)
        self.width = file.width*file.tilewidth
        self.height = file.height*file.tileheight
        self.filedata = file
    def render(self,surface):
        tImage = self.filedata.get_tile_image_by_gid
        for layer in self.filedata.visible_layers:
            if isinstance(layer,pytmx.TiledTileLayer):
                for x,y,gid, in layer:
                    tile = tImage(gid)
                    if tile:
    def make_map(self):
        temp_surface = pygame.Surface((self.width,self.height))
        return temp_surface

class Camera:
    def __init__(self,width,height): = pygame.Rect(0,0,width,height)
        self.width = width
        self.height = height
    def apply(self,entity):
        return entity.rect.move(
    def apply_rect(self,rect):
        return rect.move(
    def update(self,target):
        x = -target.rect.centerx + int(WIDTH/2)
        y = -target.rect.centery + int(HEIGHT/2)
        x = min(0,x)
        y = min(0,y)
        x = max(-(self.width-WIDTH),x)
        y = max(-(self.height-HEIGHT),y) = pygame.Rect(x,y,self,width,self.height)

class Gm():
    def __init__(self, game): = game
        self.rungame = True

class Platform1(Gm):
    def __init__(self,game):
        self.player = pygame.image.load(r"texturesplayerstand.png")
        self.player = pygame.transform.scale(self.player,(150,150)).convert_alpha()
        self.mask1 = pygame.mask.from_surface(self.player)
        gameFolder = path.dirname(__file__)
        mapFolder = path.join(gameFolder,"lvl") = TiledMap(path.join(mapFolder,"level1.tmx")) = Camera(,
        self.map_img =
        self.map_rect = self.map_img.get_rect()
        self.x = 50
        self.y = 700
        self.isJump = False
        self.jumpCount = 10

        while self.rungame:
            for event in pygame.event.get():
                if event.type == pygame.QUIT:
                    self.playing = False
                    self.rungame = False
                if event.type == pygame.KEYDOWN:
                        if event.key == pygame.K_ESCAPE:
                            self.playing = False
                            self.rungame = False
            key = pygame.key.get_pressed()
            if key(pygame.K_d):
                self.x += 5
            if key(pygame.K_a):
                self.x -= 5
            if not (self.isJump):
                if key(pygame.K_w):
                    self.isJump = True
                if self.jumpCount >= -10:
                    neg = 1
                    if self.jumpCount < 0:
                        neg = -1
                    self.y -= (self.jumpCount ** 2) * 0.5 * neg
                    self.jumpCount -= 1
                    self.isJump = False
                    self.jumpCount = 10



bash – SCL in CentOS only loads partial package

I am trying to get latest version of GFortran in CentOS 7 by running:

$ scl enable devtoolset-7 bash

in my command line. It loads the correct gcc afterwards, but fails to show correct gfortran

# before
$ which gcc
$ which gfortran

$ scl enable devtoolset-7 bash

$ which gcc
$ which gfortran

It was working fine couple of days ago. Not sure whats wrong. /opt/rh/devtoolset-7/root/usr/bin directory does list gfortran there.

iphone – My site doesn’t load properly on safari mobile browser and loads fine on Android Phones

I have recently developed my site WWW.BBNC.IN, the site was developed specially to make mobile friendly. and it works just fine on android devise browsers such as opera mini, Chrome, etc. but it does not load properly on the Apple safari browser, do I have to develop a special code for that? How does it work?

I have developed this site myself on wordpress and I have very little knowledge regarding the coding. Please help me here. I get the layout wrong, not major but minor layouts

7 – What would the next step in debugging a site that loads very slowly be?

I’m having a problem for a site to be very slow (10s page load). I’m trying to figure out what to problem could be but I’m out of ideas so hopefully you can help me with my next step. What I did:

  • Cache is enabled (core and views)
  • I’m using Redis caching
  • Database is optimized
  • Hosting has 4 cores and 6GB Memory

To find out what the problem could be I used Devel to show the queries. And it doesn’t show anything near 10s loading time.

I also comment out all the code that is on my html page, so no content or views are loaded and I still have a loading time of 10 seconds.

If you need additional information please let me know.

What could my next step be?

browser compatibility – Video not loading on iOS when logged out. When logged in, the video loads fine

I have a video playing in my wordpress site, it works no problem when logged into the site. I am using a normal html5 player. However, when the user is logged out, they cannot see the video. The issue is only with iOS both on phone or on desktop.

I’ve tried multiple different video file types like mp4/mov/etc – and all of them work perfectly normally when logged in, but when logged out it says that the file does not exist.

We don’t have any sort of content restriction enabled on our site. Has anyone dealt with this before?

postgresql – What did I miss in EXPLAIN that hinted at server crippling loads?

In trying to address a query performance problem, I reviewed the explain analyze output and found a couple subqueries were scanning the whole table. This is done to get only the most recent record in those tables related to an appointment. After some research, I decided that it would be reasonable to use a lateral join on those subqueries to dramatically reduce the amount of data scanned. Explain analyze suggested the cost of the whole query with lateral joins would be about a quarter of the original. So we proceeded. Within two hours of deploying the query change, our DB server was maxed out at 100% and basically unresponsive. Reverting the query to use subqueries scanning the tables restored the CPU usage to something sane. Our DB is running in AWS RDS for PostgreSQL using a t2.xlarge. Performance insights showed a substantial increase in ClientWrite. See database load graph.

The query using subqueries along with the explain output:
The query using lateral join along with the explain output:

So it is obvious to me I did not understand what the explain output was telling me about the queries. What did I miss that could have told me the DB load would be higher with the lateral join query despite a lower cost?