serverfault.com

VN:F [1.9.22_1171]
Rating: 6.0/10 (1 vote cast)

Common Server issues – FAQs and answers from those in the know

Nginx, redirect <old_host>/ endpoint to <new_host>/frontend/index.html masking external source

5 April 2026 @ 6:48 am

I'm trying to set up Nginx to proxy_pass the location / to an external host. I want the redirect to be masked so it looks like it's served from the old host. So I can't use return 301 <new_host> And I only want to redirect the / endpoint, not /api This is my default.conf for nginx: server { # catch all request listen 80; server_name _; location /api/ { proxy_pass http://apiserver:8080/api/; proxy_redirect default; 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; } location / { proxy_pass http://<new_host>/frontend/index.html; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

Select the remote display an RDP session connects to

5 April 2026 @ 2:33 am

I have 2 Windows 11 Pro boxes. Machine A has 2 screens, Machine B has 3. The problem is that after I connect (not using use multimon) From A to B, all the applications running on B move from Display 1 (as identified by the Display Settings GUI) to Display 3. mstsc.exe /l on Machine B shows three displays, 0:, 1: and 2:. 0: corresponds to Display 3 from the GUI (i.e., not the one I want), 1: corresponds to Display 1 from the GUI (i.e, the one I want.) I suspect that the incoming connection is routed to "0:" by default. The selectmonitors parameter allows me to control which monitor on Machine A is used, but I want to control which monitor on Machine B is used. Is there a way to configure RDP on either host to connect to display 1 (or "1:") on Machine B?

Return custom status code using php http_response_code() on 404 pages nginx

2 April 2026 @ 1:50 pm

I am using /default.php for 404 pages, and returning status code 200 using the config. server { listen [::]:443 ssl; server_name www.mywebsite.com; ssl_certificate /.cert/cert.pem; ssl_certificate_key /.cert/key.pem; root /usr/share/nginx/html; index index.php; error_page 404 =200 @defaultblock; location @extensionless-php { rewrite ^(.*)$ $1.php last; } location @defaultblock { try_files $uri $uri/ /default.php$is_args$args; } location / { try_files $uri $uri/ @extensionless-php; } location ~ \.php$ { try_files $uri =404; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } However, I want to return the status code using php http_response_code() or header() function. Current

Quota limit reached - but I only have 1 schedule (Compute Engine API: Disk Snapshot Schedules)

2 April 2026 @ 11:14 am

I just noticed that I'm hitting the quota 20 / 20 for Compute Engine API: Disk Snapshot Schedules. But I only ever created a single snapshot schedule and attached it to 18 persistent disks. It clearly doesn't target the schedules (I have 1) but it's way too low to be related to disk backups (20 disks limit? low). What's that quota about? quota view schedules list

Delete Fails when Windows NFS mounted on Linux vm

30 March 2026 @ 5:37 pm

I have a windows NFS setup with AD and on mounting it in linux vm. I’m able to create and edit the files but not able to delete the files. The user seems to be correctly mapped but delete fails. I have even given full control to the user but it still doesn’t work. Can someone help me understand the possible causes for this? The delete works correctly on the windows machine. Edit: This how I have reproduced the issue Assigned my user full control permissions to the share and in this case I was able to create,edit and delete on both server and linux vm. Updated the user to just have RX, even in this case I was able to create,edit and delete on both windows and linux because the user is part of the BUILTIN/Users and this group has permissions. Didn't change anything, just unmounted the share on linux vm and restarted the windows server(complete restart). In this case it works on wi

Is it possible to nest HAPROXY settings (defaults)?

25 March 2026 @ 12:19 pm

The HAProxy documentation states that a named defaults is possible. The anonymous defaults are always used if a named version is not called. If we have errorfile xxx /etc/haproxy/errors/errorsxxx.http for various error codes in our defaults (or even in a separate defaults http), and if we also have defined, e.g., defaults impala with various settings for that specific service, could defaults impala contain defaults http? Or even specify more than one defaults collective within the proxy config? Otherwise a lot of duplication is likely to occur.

Direct Raw Disk Export over iSCSI without VHDX Backing (Windows)

20 March 2026 @ 5:01 am

I am attempting to implement block-level remote disk access between two Windows systems: System B (Target): Hosts a physical disk (e.g., \.\PhysicalDrive0) System A (Initiator): Connects over iSCSI and mounts the disk as a local block device Current Approach: Using Windows iSCSI Target Server, which requires virtual disks backed by VHD/VHDX files. Issue: Creating a VHDX for a physical disk results in full-size allocation (e.g., a 400 GB disk requires ~400 GB storage) This introduces: Significant storage overhead Delay in provisioning It prevents instant exposure of the physical disk over the network Requirements: Export a raw physical disk directly (no intermediate full-size VHDX) Enable immediate / near-instant provisioning Maintain read-only access on the initiator side Ensure no additional storage footprint (no disk duplication) Preferably using Windows-native mechanism

DNS fails to resolve records for _msdcs.xyz.lan zone

26 June 2025 @ 4:12 pm

I have two Windows Server 2019 DNS servers and Domain Controllers connected with site-site VPN, and a client in a third location. The client can resolve the FQDN and hostname values for the servers. Dcdiag shows the DNS servers are clean. The _ldap._tcp.dc._msdcs.xyz.lan record exists in the DNS servers, and is resolvable and pingable on the domain controllers. nslookup for _ldap._tcp.dc._msdcs.<domain>.lan from the client fails. I see queries to the root servers. (a.root-servers.net). Wireshark shows the query went to the correct DNS server, but the DNS server returns non-existent domain. This is preventing computers from joining the domain. I'm not using external forwarders or DNS servers. All other records for the domain resolve. What is puzzling is in the DNS server, there are two zones. xyz.lan and a single _msdcs stub that contains nothing else. _msdcs.xyz.lan which there ar

High I/O NFS writes causes system hang [closed]

16 April 2025 @ 9:19 pm

Downloading from my NAS using NFS works for low volume, but during a large file transfer the system hangs and is non-responsive to input using SSH or GUI. After transfer is complete, it will act normal. The system doesn't reboot, or crash. However, when copying files using SFTP/SMB/SCP/Rsync, the problem does not occur, only NFS. fstab: XX.XX.XX.XX:/mnt/BigMomma /mnt/BigMomma nfs auto,hard,intr,vers=4.2,rsize=4096,wsize=4096,noatime,fsc,rdirplus,tcp,actimeo=1800 Running Linux Mint 22.2 NFS to TrueNAS with Wireguard S2S tunnel. Small files work better when operating over WAN/VPN than large sizes. Optimal size is 1396 which is an ethernet packet size minus various overhead, but the IOPS increases. Anyone know the cause?

Disable Windows Defender Firewall pop up for a target folder

22 April 2023 @ 11:45 am

When I compile and run a Go application, Windows Defender Firewall will prompt to allow use of the application. This may be due to the application using sockets. Here is what's happening: I make changes to the code I compile and create an .exe Run the new .exe Windows Firewall presents a Security Alert popup Windows Defender Firewall notification at compilation Is it not possible to create a firewall rule exception for a whole folder? I could disable the firewall but that's not a good idea.