• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Installing WordPress With NGINX on Debian on Rackspace Cloud Server

By Abhishek Ghosh March 7, 2014 11:16 am Updated on March 7, 2014

Installing WordPress With NGINX on Debian on Rackspace Cloud Server

Advertisement

Installing WordPress with NGINX web server on Debian Operating System on Rackspace Cloud Server demands some guide vs Apache2.0. Here is step by step guide. The reason why installing WordPress with NGINX web server on Debian Operating System on Rackspace Cloud Server will require additional help even for the advanced users has multiple reasons – no, managed Rackspace Cloud Server now actually supports NGINX. That reason to guide has been obsolete now. Among various reasons, most common reason is – frankly we are more used with Apache Web Server than NGINX web server. There are many styles of installation and optimization.

 

Installing WordPress With NGINX on Debian : Previous Guides and More Resources

 

Those who are fully new, please install and play either with a mock setup or with VirtualBox on your Mac or PC. Even if you are using Debian OS on PC, do not directly do the trial and errors. May be, you are actually shifting WordPress from Apache to nginx Web Server. May be, you are going to install WordPress with PostgreSQL. Actually we have discussed before on how to install nginx on Rackspace Cloud Server with Centmin Mod Nginx Auto Installer easily. There was another guide on installing Nginx with PHP5, MySQL on Rackspace Cloud Server.

With time, we need to update the guides as the packages changes, Rackspace specially upgrades their available services.

Advertisement

---

 

Steps for Installing WordPress With NGINX on Debian on Rackspace Cloud Server

 

To import the MySQL dump, in case you are shifting, you can run rsync to sync between the two servers. We however is describing the steps in this guide for installing WordPress with NGINX on Debian on Rackspace Cloud Server for a fresh copy, not transfer case.

We will suggest to create an user :

Vim
1
2
3
4
5
6
# henceforth, hash is used to indicate our comment
# line with hash are not commands & lines without hash are single commands.
# you can combine two commands with &&
# we use hash like commenting out, it is easy to create bash scripts for the advanced users
useradd -m <username>
passwd <username>

Routine work is to run three commands :

Vim
1
2
3
apt-get update
apt-get dist-upgrade
reboot

You will SSH with user account and do the works. This is safer method. Actually you can toggle permission to limit access :

Vim
1
2
3
4
5
6
7
nano /etc/ssh/sshd_conf
# alternatively open with vim
vi /etc/ssh/sshd_conf
# find the line
PermitRootLogin yes
# change it to
PermitRootLogin no

In this way, you can use su - to run commands with privilege only with password. UFW (Uncomplicated Firewall) is very nice to setup Firewall with few commands :

Vim
1
2
3
4
5
6
7
# install the package
apt-get install ufw
# let us configure
ufw allow www
ufw allow ssh
ufw default deny
ufw enable

This is basic setup. It is, probably safe to harden nginx from this Gist. As everyone knows, we need to add backports/dot deb on Debian for getting updated nginx packages :

Vim
1
2
3
4
5
6
7
echo 'deb http://backports.debian.org/debian-backports squeeze-backports main' >> /etc/apt/sources.list.d/backports.list
echo 'deb http://packages.dotdeb.org stable all' >> /etc/apt/sources.list.d/DotDeb.list
echo 'deb-src http://packages.dotdeb.org stable all' >> /etc/apt/sources.list.d/DotDeb.list
wget http://www.dotdeb.org/dotdeb.gpg
cat dotdeb.gpg | sudo apt-key add -
rm dotdeb.gpg
sudo apt-get update

The echo method is better than editing /etc/apt/sources.list.d file. Kevin Carter (Rackspace) initially wrote it and an user named Nick fixed it. It is quite good idea to use echo like we do on OS X. For this kind of efficiency, honestly we suggest for managed Rackspace. Understand it – to fix your broken bone, it will take 10 minutes for me but fixing server stuff will demand 30 minutes. Despite I am using UNIX for ~20 years, even before I entered Medical School. Regular exposure makes someone better in prototype work. What so ever, install nginx :

Vim
1
apt-get install nginx-full

Now edit the configuration file :

Vim
1
nano /etc/nginx/nginx.conf

Another gist is here to check the basic configuration.

Installing WordPress With NGINX on Debian on Rackspace Cloud Server

Vim
1
2
3
4
5
6
7
# multistep commands
mkdir -p /var/www/domain/httpdocs
mkdir /var/www/domain/logs
chown -R www-data:www-data /var/www/
ln -s /etc/nginx/sites-available/sitename /etc/nginx/sites-enabled/sitename
# sitename can be sitename.tld, sitename.conf etc. Restart.
service nginx restart

That file, at minimum should have this prototype configuration.

You must edit your Domain™s DNS records and point the A records to your server™s IP address to make it working. After propagation, browser can open the sites / contents located at var/www/domain/httpdocs.

We need to install MySQL and other stuffs :

Vim
1
2
apt-get install mysql-server-5.5
apt-get install php5-fpm php5-mysql php5-apc php5-xsl php5-xmlrpc php5-sqlite php5-curl php5-gd php5-tidy

We need now to create our WordPress vhost config, in example case it is /etc/nginx/sites-available/sitename ” and edit as we described above as you can host multiple websites. Now create a database :

Vim
1
2
3
4
5
mysql -u root -p
CREATE DATABASE namedb;
GRANT ALL PRIVILEGES ON namedb.* TO "namedb_user_name"@"localhost" IDENTIFIED BY "password";
FLUSH PRIVILEGES;
EXIT

Depending on number of sites, location will vary, go to :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
cd /etc/nginx/sites-available/sitename
wget http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
cd wordpress
mv * .
# above command might need double dot instead of single for linux
cd ..
rm -r wordpress
# Edit wp-config file
nano wp-config-sample.php
# give the details
# save as wp-config.php
# follow normal wordpress installation
# https://codex.wordpress.org/Installing_WordPress

For W3 Super Cache, we need to install Varnish :

Vim
1
2
3
4
5
curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add -
echo "deb http://repo.varnish-cache.org/debian/ <version-name> varnish-3.0" >> /etc/apt/sources.list
apt-get update
apt-get install varnish
# replace version-name with wheezy or what you are using

Polishing varnish is important! But we will not go in to details here, just the minimum :

Vim
1
2
3
4
5
6
7
8
sudo nano /etc/default/varnish
# configaration file should match
 
DAEMON_OPTS="-a :80
             -T localhost:6082
             -f /etc/varnish/default.vcl
             -S /etc/varnish/secret
             -s malloc,256m"

After saving, exit and edit this file :

Vim
1
sudo nano /etc/varnish/default.vcl

It should look like this :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
backend default {
    .host = "127.0.0.1";
    .port = "8080";
}
 
sub vcl_recv {
        if (!(req.url ~ "wp-(login|admin)")) {
                unset req.http.cookie;
        }
}
 
sub vcl_fetch {
        if (!(req.url ~ "wp-(login|admin)")) {
                unset beresp.http.set-cookie;
        }
}

We will polish varnish, apc; but that is another longer story. This is the minimum setup for WordPress with NGNIX.

Tagged With compoundpv5 , expect86y , followcz8 , honorhjv , pictured8s1

This Article Has Been Shared 461 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Installing WordPress With NGINX on Debian on Rackspace Cloud Server

  • Free Cloud Services and CDN are Risk Factors for your WordPress Blog

    Free Cloud Services and CDN service with or without caps are offered nowadays by various WordPress plugins. They can be dangerous for your valuable blog.

  • Cloud Computing Privacy : Are Service Providers Concerned about?

    Cloud Computing, especially the free public cloud has known issues with the privacy and security of the end users. But, how much the Cloud Service Providers are thoughtful about these?

  • Cloud Storage : Unsolved Problems

    Cloud Storage has some unsolved problems, despite the flexibility it offers. What if we want to take the data from the Cloud Storage or change our providers ?

  • Relocating Groupware to Cloud

    Relocating Groupware to Cloud should planned and prepared well. Collaboration and groupware solutions are well suited for cloud and are already widely used.

  • Cloud Computing and The Consequence of Employment in IT Sector

    Cloud Computing and The Consequence of Employment in IT Sector is quite burning topic now as happened few decades back while mass introduction of Computers.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Exploring the Benefits and Advantages of Microsoft’s Operating System March 22, 2023
  • Web Design Cookbook: Accessibility March 21, 2023
  • Online Dating: How to Find Your Match March 20, 2023
  • Web Design Cookbook: Logo March 19, 2023
  • How Starlink Internet Works March 17, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Installing WordPress With NGINX on Debian on Rackspace Cloud Server," in The Customize Windows, March 7, 2014, March 22, 2023, https://thecustomizewindows.com/2014/03/installing-wordpress-nginx-debian-rackspace-cloud-server/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT