Tool for enabling or disabling nginx sites (a2ensite analogue for nginx)

0
Comments

If you have previously used Apache you should now about a2ensite tool. If you start using nginx you probably find out that there are no such tool for nginx. You can use following command to do that: ln -s /etc/nginx/sites-available/mysite /etc/nginx/sites-enabled/mysite and then restart nginx sudo service nginx restart But... I have found one small script that can do that for you. Also, it can display list of all available or enabled sites, disable site and automatically restart nginx. Just put...

Read further...

nginx wordpress configuration

0
Comments

Simple but working nginx configuration for wordpress based web site... server { server_name site.com; root /var/site.com/www; index index.php; location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location ~ /\. { deny all; } location ~* /(?:uploads|files)/.*\.php$ { deny all; } location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/ph...

Read further...

Migrate from Apache to nginx + php-fpm and speed up your site twice

0
Comments
Migrate from Apache to nginx + php-fpm and speed up your site twice

This blog is hosted (together with mintchocolate.org) on a small VPS (1x2.8 Ghz, 256 Мб RAM, 10 Gb SSD). This VPS is shipped with apache2, php and mysql. As you can see I am using wordpress for this blog, also I have approximately 1000 unique visitors per day (half of them visit this and this articles). So it is good to have small response time. Apache First I need to measure how slow my blog is. I have used loadimpact.com to do that. This is result for apache2: [caption id="" align="aligncenter...

Read further...

[How-to] Downgrade Nexus from 5.0 to 4.4

4
Comments

I have installed Android 5.0 on my Nexus 7 (2012, wi-fi) and that was the biggest mistake I have ever done with my tablet pc. I don't know, maybe the problem is not in Android Lollipop, but in my concrete device, but after installing 5.0 it becomes incredibly slow! First 5 minutes after restart it works fine, but then everything become soooo sloooow.... Here are some steps that can help you with downgrading your Nexus device (5 or 7) from  5.0 to 4.4 (or whatever you want). Download factory imag...

Read further...

[How-to] BlueStacks: Change Android device id

2
Comments

Sometimes you need to change android device id in your Android emulator. If you are using rooted BlueStacks image - you can use Android ID Changer. This tool works only on rooted devices! Download Android ID Changer

Read further...

[Fixed] Apache mod_status: /server-status forbidden from 127.0.0.1

1
Comments

If you have mod_status enabled but still got this error (403) when trying to connect from localhost (127.0.0.1) you can should do following: First, go to /etc/apache2/mods-enabled/status.conf and check that you have all hosts that you want to connect from is added to Allow from, something like this:   <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 ::1 </Location> Second, create VirtualHost configuration for 127.0.0.1 with f...

Read further...