Technical Lead based in Manchester, UK

Nginx Proxy Wordpress Configuration


If you need to proxy your Wordpress blog via Nginx. This is the configuration I have recently used. Update with your intended domain name. and with the Wordpress servers details. server { server_name ; gzip on; gzip_min_length 10240; gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml; gzip_disable “MSIE [1-6]\.”; add_header Cache-Control public; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_pass http://:; } }…
Read more ⟶

Test Nginx Configuration


To test your Nginx configuration files, run the following command: nginx -c /etc/nginx/nginx.conf -t It will indicate if your configuration file syntax is correct. Configuration Check Failure root@proxy:/etc/nginx/sites-enabled# nginx -c /etc/nginx/nginx.conf -t nginx: [emerg] a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-enabled/test01:2 nginx: configuration file /etc/nginx/nginx.conf test failed Configuration Check Success root@proxy:/etc/nginx/sites-enabled# nginx -c /etc/nginx/nginx.conf -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful…
Read more ⟶

Scraping Imgurl.com for images!


Like most of the code I write these days in my spare time, It’s usually for a little bit of fun! This time, I just wanted to get a random bunch of images from Imgurl.com to collect some “memes”. I’ll warn you now, the internet is not a nice place. People upload all sorts of random stuff to Imgurl. Be warned! Let’s get technical! Firstly, I decided to use Python 3 on an EC2 micro (AWS virtual server).…
Read more ⟶