How to install and configure WordPress hosted on Nginx with PHP-FPM on Debian based distros

Nginx is an open source web server. Users have been moving to Nginx because of the high performance and stability and as of February 2014, Nginx is hosting around 15% of all web servers according to Netcraft’s Web Server Survey. Nginx is a great option for hosting WordPress sites.

It’s assumed that you have already installed Nginx with PHP-FPM. If you haven’t already done that, you can use this tutorial: How to install Nginx with PHP and MySql support on wheezy

1. Create the database for WordPress

mysql -u root -p
CREATE USER {username}@localhost;
GRANT ALL PRIVILEGES ON {username}.* TO {database}@localhost IDENTIFIED BY '{password}';

Continue reading

How to solve URL scheme mismatch when running Jira behind a reverse proxy

I’m running Jira behind a Nginx proxy with SSL enabled. Jira was giving me this error message in the login:

We've detected a potential problem with JIRA's Dashboard configuration that your administrator can correct. Click here to learn more
We've detected a potential problem with JIRA's Dashboard configuration that your administrator can correct. Hide
Dashboard Diagnostics: Mismatched URL Scheme
JIRA is reporting that it is using the URL scheme 'http', which does not match the scheme used to run these diagnostics, 'https'. This is known to cause JIRA to construct URLs using an incorrect hostname, which will result in errors in the dashboard, among other issues.
The most common cause of this is the use of a reverse-proxy HTTP(S) server (often Apache or IIS) in front of the application server running JIRA. While this configuration is supported, some additional setup might be necessary in order to ensure that JIRA detects the correct scheme.
The following articles describe the issue and the steps you should take to ensure that your web server and app server are configured correctly:
    Gadgets do not display correctly after upgrade to JIRA 4.0
    Integrating JIRA with Apache
    Integrating JIRA with Apache using SSL
If you believe this diagnosis is in error, or you have any other questions, please contact Atlassian Support.
Detailed Error
com.atlassian.gadgets.dashboard.internal.diagnostics.UrlSchemeMismatchException: Detected URL scheme, 'http', does not match expected scheme 'https'

To solve it you need to edit the server.xml config file located in the Jira “installation directory”, by default: /usr/local/atlassian/jira.

Open the config file with a text editor and add these three lines in the Connector node (pico /usr/local/atlassian/jira/conf/server.xml):

    <Service name="Catalina">
        <Connector port="8103"
<!-- Lines added to solve the URL scheme mismatch -->

Replace proxyName and proxyPort with the hostname and port of your reverse proxy.