[Fixed] Web Server Issue

Web hosting, MySQL, PHP and all that good stuff.
Post Reply
User avatar
Nazar78
Posts: 2228
youtube meble na wymiar Warszawa
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

[Fixed] Web Server Issue

Post by Nazar78 »

Heads up for those using the built-in apache for the web server. I've opened a ticket to Asustor Support.
Hi Support,
  1. I've noticed a new bug in the Web apache2 2.4.55.r17. It only listen to IPv6 but not IPv4. This doesn't happen if nginx is selected.
    root@Nimbustor4:~# netstat -lntp|grep :80
    netstat: showing only processes with your user ID
    tcp 0 0 :::80 :::* LISTEN 2344845/apache2

    There should be another line that states 0.0.0.0:80 for IPV4.

    Apart from my NAS AS5304T, I also tested and confirm the bug exists on another NAS AS1102T.

    EDITED: it turns out apache2 binds to all interfaces despite only showing IPv6 in netstat. Have notified Asustor Support to disregard this issue but the nginx issue below still exists.

    ------
  2. This is an existing bug even before firmware 4.3.0.RSB1 which I believe has been reported by one of the fellow Asustor Forum user. For nginx, Asustor forgots to add the PHP block for virtual hosts. This means all the virtual host doesn't work with PHP 7.3/7.4/8.1. See the example below for the conf file: /usr/local/AppCentral/nginx-1.18.0/data/conf/sites-enabled/vhost_rewrite.g.je_444.conf:

    server {
    listen 444 ssl;
    listen [::]:444 ssl;
    ssl_certificate /usr/builtin/etc/certificate/ssl/d26e5f99-5a44-4738-86bc-3ab69bbbbb7c/ssl.crt;
    ssl_certificate_key /usr/builtin/etc/certificate/ssl/d26e5f99-5a44-4738-86bc-3ab69bbbbb7c/ssl.key;
    root "/volume1/Web/rewrite/public";
    server_name rewrite.g.je;
    index index.html index.htm;
    autoindex on;

    # This PHP block is missing! ######################################################
    location ~ \.php$ {
    include fastcgi_params;
    fastcgi_pass unix:/usr/local/AppCentral/php8.1/etc/socket/php-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
    # This PHP block is missing! ######################################################

    location / {
    }
    }
Last edited by Nazar78 on Sat Jun 15, 2024 10:55 am, edited 2 times in total.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
Shedder
Posts: 54
Joined: Thu Feb 01, 2024 3:46 am

Re: Web Server Issue

Post by Shedder »

Hi all.

I am "the other NAS AS1102T"
The symptoms are, when trying to access the website, when it is on the same LAN:
Initially - "401 Authorisation required nginx", to "403 Denied" or "Connection timed out"

However, using the portal, The dashboard is working fine.

Very annoying when you've changed a page on the website and want to see how it looks in the browser.

Not a good advertisement for Asustor.
User avatar
snapshot
Posts: 173
Joined: Sat Mar 16, 2013 6:58 am
Location: Wiltshire, England

Re: Web Server Issue

Post by snapshot »

I have IPv6 disabled on the NAS and the GIF on my home page won't display although it does on my PC via IIS and also on my domain.If I copy the URL for the GIF to a new tab I get a 403. Presumably this is the same bug?
User avatar
Nazar78
Posts: 2228
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Web Server Issue

Post by Nazar78 »

I just found on the web that if you don't specify the address, apache will bind and listen to all interface despite netstat only showing IPv6. I also tested this again and it seems true. However I could not recreate the issue where you guys are getting 401/403 from nginx? I just got timeout when connecting to @Shedder's site whilst I could connect to the site from his ssh terminal. Were there any new changes to the router or UK ISP blocking 80/443? @Shedder can you check your router again if port 443 is opened?
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
User avatar
Nazar78
Posts: 2228
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Web Server Issue

Post by Nazar78 »

@Shedder

This is what I got trying to access your site from your NAS ssh terminal:
Image

It seems your ISP is now blocking the default port 80/443, the server mail ports are however still accessible.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
User avatar
Nazar78
Posts: 2228
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Web Server Issue

Post by Nazar78 »

@Shedder

Ok it's not ISP blocking, something is wrong with your port forwarding, using EZ-Router I'm able to access the ports 80/443 however this risks opening the ADM ports to the public which Asustor don't allow to exclude. I've disabled the EZ-Router and used miniupnpc instead with some custom 300secs interval script without exposing ADM ports, only https and mail ports. Don't turn off your router's UPnP, your site is back up and running now.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
Shedder
Posts: 54
Joined: Thu Feb 01, 2024 3:46 am

Re: Web Server Issue

Post by Shedder »

Once again, thanks for all your help.
I take it the drives whizzing around every 5 minutes is the script you've installed.
Is there a likelihood Asustor will fix this problem so I can get a good night's sleep one day?
User avatar
Nazar78
Posts: 2228
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Web Server Issue

Post by Nazar78 »

Shedder wrote: Tue Jun 04, 2024 10:27 pm Once again, thanks for all your help.
I take it the drives whizzing around every 5 minutes is the script you've installed.
Is there a likelihood Asustor will fix this problem so I can get a good night's sleep one day?
The upnpc script I wrote and installed on your NAS doesn't wake your disks. Because ADM doesn't let us disabled the ADM ports using its EZ-Router, I installed that script on your NAS so it would open only those necessary ports for web and email except ADM's which you can see from your router. When you're doing web/email hostings on the NAS, bots, crawlers etc. would wake those disks if persistent memory cache is not present.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
Shedder
Posts: 54
Joined: Thu Feb 01, 2024 3:46 am

Re: Web Server Issue

Post by Shedder »

Aha!
Well they've stopped trying, so that's a relief.
Thanks again.
User avatar
Nazar78
Posts: 2228
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Web Server Issue

Post by Nazar78 »

Nginx virtual host PHP block has been fixed in the latest firmware 4.3.1.R6C1.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
Post Reply

Return to “Web Hosting”