Tips / Nginx

Nginx Configuration For Concrete5

Concrete5 is a CMS that is becoming pretty popular as a WordPress alternative. It allows you to generate a web page without losing much time and with all of the common functions of the three most popular CMS: Joomla, Drupal and WordPress.

Concrete5 is easy to set up and can be ready to use within a few minutes from its web interface.

Main features of concrete5

  • Compatibility with most modern PHP-MySQL versions.
  • Easy installation and configuration from the web browser.
  • Create and edit content from within the same pages, without going to a separate area (like WP).
  • Complete user management area with editor and admin privileges.
  • Insert and manipulate different types of content, like images, image galleries, comments, text, maps, videos and much more.
  • Full CDN and Cache integration to speed up website response time.

The assumption in this tutorial is that you already have Nginx and PHP-FPM running on your server with socket defined as /tmp/php5-fpm.sock. Tweak as needed if your php-fpm configuration is different.

Concrete5 + Nginx configuration

Running concrete5 on Nginx requires a simple but effective configuration. This example uses as the main website and /var/www/html/ as the default root directory:

nano -w /etc/nginx/conf.d/

Paste this inside:


server {
log_not_found off;
error_log  logs/ warn;

        listen       80;
        root   /var/www/html/;
       index  index.php index.html index.htm;

        location ~* .(gif|jpg|jpeg|png|ico|wmv|3gp|avi|mpg|mpeg|mp4|flv|mp3|mid|js|css|wml|swf)$ {
                expires max;
                add_header Pragma public;
                add_header Cache-Control "public, must-revalidate, proxy-revalidate";

        location / {
                try_files $uri $uri/ /index.php$request_uri /index.php;

# php-fpm configuration
        location ~ .php$ {
            try_files $uri =404;
            fastcgi_pass   unix:/tmp/php5-fpm.sock;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
            fastcgi_buffer_size 128k;
            fastcgi_buffers 256 4k;
            fastcgi_busy_buffers_size 256k;
            fastcgi_temp_file_write_size 256k;

Remember that this is a basic working example configuration for concrete5 with Nginx + PHP-FPM. You will need to replace with your own real domain name and tweak the php-fpm or document_root configuration as needed.

Installing Concrete5

Move to your document_root directory, download concrete5 from and extract as shown below:

cd /var/www/html/
mv index.html
rm -fv
mv concrete5*/* ./

After that, launch htp:// and the concrete5 installation process will begin. Follow the instructions, connect to your MySQL database and you should be set.


The setup and configuration of concrete5 is very simple. It allows you to have a great alternative to the traditional WordPress CMS with almost all of the same features. If you are tired of dealing with WordPress and all of its troubles, then it’s time to give concrete5 a try. You won’t regret it.


Popular search terms:

  • concrete5 nginx
  • concrete5 and fastcgi
  • concrete5 host using nginx
  • https://www scalescale com/tips/nginx/nginx-configuration-concrete5/

Esteban Borges

Linux Geek, Webperf Addict, Nginx Fan. CTO @Infranetworking