Hot answers tagged

5

Looks like a Samsung Galaxy using outdated dns-entry for m.facebook.com ;-) Well, if you take a look at your access.log you will find a lot of requests like /pma, /webadmin, /admin/config.php, /w00tw00t, /vtigercrm and so on. It seems that there are a few bots checking for old / vulnerable versions of well-known opensource software like phpmyadmin, ...


4

Have you tried using "example.com" instead of the IP address? At least with Apache, the whole point of the server_name field is to allow multiple websites (name spaces) to be served from a single IP address. The client that is following "http://example.com" does the DNS lookup and sends the request to the IP address it gets from the DNS lookup, but ...


3

The described behavior matches haproxy's http health checks. New sessions are created because haproxy does not keep cookies between health checks, thus your application (Laravel) considers the request the first request of a new browsing session. You could reconfigure your health check url to something that does not use sessions to avoid creating the ...


3

It looks like your default setting for ipv6only is different. On most operating systems you can create IPv6 sockets that also accept IPv4 connections so that you only need one socket (one listen directive). It seems that on your old server it used ipv6only=on so you created both an IPv4 and an IPv6 socket. On your new server the default is ipv6only=off, ...


2

You can define a location for an individual URI by using the location = form. location = /test.html { allow 1.2.3.4; deny all; } See this document for details.


2

An approach is to serve static files in the front-end and only proxy if they do not exist. You can deploy your error pages and resources on this server. Avoid directory conflicts between the front and back ends. For example: root /usr/share/nginx/html; location / { try_files $uri @proxy; } location @proxy { proxy_pass http://api; } See this ...


2

You're right - nginx can't distinguish a request for the error page assets from normal requests. You should either change the assets to use a unique path that you can do location matching on (maybe something like /500/logo.png), or use an external service to host the assets (S3 or the like), and load it from there. For the location match, it would ...


2

The error is self-explanatory, file /etc/mongodb.conf is missing on your system, so you need to create one. This simple config will allow you to start mongod systemLog: verbosity: 1 quiet: true traceAllExceptions: false path: "/opt/mongo/log/local.log" logAppend: true destination: file storage: dbPath: "/opt/mongo/db" journal: enabled: true ...


1

The server part in the log line is the nginx virtual host server name that processed the request. If you don't have a server block with server_name localhost, then it uses any server block with default_server attribute. If you don't have a default_server defined in your nginx configuration, I assume nginx will put localhost in that case. host is the value ...


1

I was either being MITMed as suggested by ceejayoz or my ISP (AT&T) was having problems at the time of asking this question.


1

Try this: server { listen 80; server_name firstnode.com; location ~ ^/storm(?<section>.*)$ { return 301 $scheme://secondnode.com:8080$section; } } Here we capture the part after /storm into section variable, and then use that variable in the return statement to form the desired path.


1

You can handle this in the following way. server { server_name www.abc.com; listen 3000; return 301 $scheme://www.abc.com/login; } server { server_name www.abc.com; listen 80; location /login { <you config here> } } The first server block you see listens for request on port 3000 ...


1

If you have only one site configured, then you can try using this in nginx config: server_name _ ; If will force server to accept all HTTP requests, no matter what Host header is.


1

So I was finally able to resolve this, but not in any way I've seen described anywhere else. I set "net.ipv6.bindv6only = 1" in /etc/sysctl.conf and reloaded via "sudo sysctl -p". Then with the configuration in the server directive "listen 80; listen [::]:80;" I now get my workers split evenly between ipv4 and ipv6 and now I can connect from either ip ...


1

You need a location block in your config like this location = /test.html { deny 192.168.1.1; #define the IP you want to block here allow all; #allow the rest } Nginx tests IP in order and accepts the first match, so in this case your denied IP will match the first entry and all others will match the allow all


1

You need to use alias instead of root. With root, the URI is appended to the path specified, so in your case http://www.example.com/data becomes /var/www/example.com/html/data/data. With alias /var/www/example.com/html/data, it becomes /var/www/example.com/html/data.


1

I found the answer after spending a few more hours on it this morning. You need two additional server blocks: one to enforce the www, one to enforce the https while keeping the wildcard subdomain. Here's the code: server { listen 80; listen 443; server_name domain.com; return 301 https://www.domain.com$request_uri; } server { listen 80; ...


1

Likely incompatibility with PHP 7. You can follow this guide to purge PHP 7 from your system and install PHP 5.6 instead. This might fix your problem, but I think PHP 7 is supported in Joomla 3.5. Are you using an older version of Joomla that does not support PHP 7? You can try this in the meantime and see if it fixes your problem, or download the latest ...


1

I'm having the same issue with Ubuntu 16.04, systemd and NginX 1.10.1 from source. I'm was using the default nginx.service file: https://www.nginx.com/resources/wiki/start/topics/examples/systemd/ The issue was the nginx.pid lcoation, to fix it I: Fired up Nginx without the service sudo nginx start Updated the locate db: sudo updatedb Found the ...


1

I'm kinda using your same stack (so no apache involve). What i like to use is apt-get --no-install-recommends install phpmyadmin And this will only install phpmyadmin withou apache



Only top voted, non community-wiki answers of a minimum length are eligible