How do I block a http user agent or a software agent using Nginx web server under Linux or Unix like operating systems?
You can block any http user agents with GET / POST requests that scrape
your content or try to exploit software vulnerability. Use the
following syntax. Edit /usr/local/nginx/conf/nginx.conf file, enter:
Change website
From Jan 16 2015,
All post content will be move to we's offical website with many content...
Can access website here: http://justox.com
Thanks for your visit!
Friday, 27 December 2013
Nginx Redirect URL With HTTP/1.1 301 Moved Permanently Header
How do I redirect old ugly urls such as
http://example.com/store/view.jsp?product=foo with clean url -
http://example.com/store/view/product/foo using nginx reverse proxy?
You need to use HttpRewriteModule under nginx web server. This module makes it possible to change URI using regular expressions (PCRE), and to redirect and select configuration depending on variables. The syntax is as follows to chage URI in accordance with the regular expression and the replacement string.
You need to use HttpRewriteModule under nginx web server. This module makes it possible to change URI using regular expressions (PCRE), and to redirect and select configuration depending on variables. The syntax is as follows to chage URI in accordance with the regular expression and the replacement string.
Too Many Open Files Error And Solution on Nginx
I'm getting the following error in my nginx server error log file:
2010/04/16 13:24:16 [crit] 21974#0: *3188937 open() "/usr/local/nginx/html/50x.html" failed (24: Too many open files), client: 88.x.y.z, server: example.com, request: "GET /file/images/background.jpg HTTP/1.1", upstream: "http://10.8.4.227:81//file/images/background.jpg", host: "example.com"
Setup SSL Reverse Proxy (Load Balanced SSL Proxy) on Nginx
A reverse proxy is a proxy server that
is installed in a server network. Typically, reverse proxies are used in
front of Web servers such as Apache, IIS, and Lighttpd. How do I setup
nginx web server as SSL reverse proxy?
When you've multiple backend web servers, encryption / SSL acceleration can be done by a reverse proxy. Nginx can act as SSL acceleration software. It provided the following benefits:
Easy of use : Nginx is easy to setup and upgrade.
When you've multiple backend web servers, encryption / SSL acceleration can be done by a reverse proxy. Nginx can act as SSL acceleration software. It provided the following benefits:
mod_extforward: Lighttpd Log Clients Real IP Behind Reverse Proxy / Load Balancer
I've setup 5 lighttpd web servers
behind Nginx based reverse proxy / load balancer to distribute load for
busy e-commerce website. However, all web server nodes putting my load
balncers two IP address in access log file. How do I force lighttpd to
log a real IP (public IP) address of all client computers visiting our
website?
You need to use mod_extforward under Lighttpd to extract and log the client's real IP from "X-Forwarded-For" or "X-Real-IP" header which is added by reverse proxy server such as Nginx or Squid proxy server.
You need to use mod_extforward under Lighttpd to extract and log the client's real IP from "X-Forwarded-For" or "X-Real-IP" header which is added by reverse proxy server such as Nginx or Squid proxy server.
Create Custom 404 / 403 Error Page on NGINX
How do I create a custom static HTTP 404 or HTTP 403 error page under nginx web server?
First create 404.html in your document root. The default is location is /usr/local/nginx/html/. So create a HTML file as follows:
First create 404.html in your document root. The default is location is /usr/local/nginx/html/. So create a HTML file as follows:
Nginx Redirect All HTTP Request To HTTPS Rewrite Rules
have setup nginx as a secure reverse proxy server. How do I redirect all http://example.com/ requests (traffic) to https://example.com/ under nginx web server?
The syntax is as follows. You need to add the following in location or server directives:
The syntax is as follows. You need to add the following in location or server directives:
Fixed Nginx: 413 Request Entity Too Large Error and Solution
'm running nginx as a frond end to php
based Apache+mod_fastcgi server. My app lets user upload images upto 2MB
in size. When users trying to upload 1.5MB+ size image file using
nginx reverse proxy, they are getting the following error on screen:
You need to configure both nginx and php to allow upload size.
Nginx 413 Request Entity Too LargeHow do I fix this problem and allow image upload upto 2MB in size using nginx web-server working in reverse proxy or stand-alone mode on Unix like operating systems?
You need to configure both nginx and php to allow upload size.
Cpanel Database Backup
The database would be stored in MySQL's base directory, which by default
is /var/lib/mysql. If a different base directory is used, it would be
specified in /etc/my.cnf.
not recommend simply copying the database files. While this can often work, the approved MySQL method is to create a dump, and use the dump to import the database on the "new" server. The basic syntax is the following on the "old" server:
not recommend simply copying the database files. While this can often work, the approved MySQL method is to create a dump, and use the dump to import the database on the "new" server. The basic syntax is the following on the "old" server:
MySQL ERROR 1018: Unable to Follow Symlink in Ubuntu
I recently had a issue getting MySQL to read a specific
database. Each time I tried to manually query a table in the database, I
received the following error message:
ERROR 1018 (HY000): Can't read dir of './default/' (errno: 13)I’ve seen this message before as it means that there is a permissions issue. I checked the ownerships and permissions, and everything seemed to be in order.
Subscribe to:
Posts (Atom)