Use the following configuration in Apache's httpd.conf file or within a virtual host configuration. Note that you should set DocumentRoot and ServerName fit to your environment:
Moved to git repository: https://github.com/denji/nginx-tuning
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
Guide info:
| Download Google Drive files with WGET | |
| Example Google Drive download link: | |
| https://docs.google.com/open?id=[ID] | |
| To download the file with WGET you need to use this link: | |
| https://googledrive.com/host/[ID] | |
| Example WGET command: |
Listed below are the steps I took to use Ceph object store for WordPress media without a plugin. It works by mounting Ceph (or an AWS S3) bucket as a network device on the file system via s3fs and using wp-content/uploads/ as the mount path.
Since s3fs is POSIX compatible, it means you can still access (and manage) the media within wp-content/uploads/ over SFTP/SSH as if they are natively there.
WP-CLI commands such as wp media import and wp media regenerate also still work.
Although your media is being stored and fetched from a network storage bucket, your web server can still resolve all the requests to wp-content/uploads/ on the local filesystem like normal.
This means that image URLs do not have to be rewritten and will use the core format you're used to over HTTP https://mysite.com/wp-content/uploads/cat.jpg and any absolute filesystem paths in PHP that may exist `/path/to/wp-content
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the\commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
Here's a 'simple' way to get the YouTube subscriber number from Google's Youtube API v3:
- Go to https://console.developers.google.com/apis/library
- Log in with your Google account.
- Next to the logo click on 'Project' and 'Create project'. Name it whatever you want and click on 'Create'.
- Wait until the project is created, the page will switch to it by itself, it will take a couple of seconds up to a minute. Once it's done it will be selected next to the logo.
- Once it's created and selected, click on 'Credentials' from the menu on the left.
- Click on 'Create Credentials' and choose 'API Key'. You can restrict it to specific IPs, or types of requests (website, android, ios etc.) if you want, it's safer that way.