Here is how I configured the site and got everything working. I’m sure there are many mistakes and examples of bad practice in my config files, and I take no responsibility if you follow this guide and create a website riddled with security holes. If you choose to follow this guide, you should take suitable measures tosecure your site. This guide assumes you already have a dynamic DNS or static IP address setup and you know how to access the server to install stuff, your ports are forwarded correctly and you are running Arch Linux.
First, download the latest version of Anchor CMS and extract to /srv/http so you have a folder structure like /srv/http/anchorcms/.
Change the owner of all the files to the http user, give the http user full access, and give everyone else only read and execute access.
cd /srv/http/anchorcms sudo chown -R http * sudo chmod -R 755 *
Download the necessary packages from the Arch repos.
pacman -S mysqld php php-fpm nginx
Set up a database.
mysql -u root -p mysql> create database anchordb mysql> USE anchordb
Make sure the /etc/php/php.ini file lists /srv/http/ in the open_basedir directive and the following extensions in the dynamic extensions section are uncommented.
open_basedir = /srv/http/ extension=gd.so extension=gettext.so extension=openssl.so extension=pdo_mysql.so
Make sure the /etc/php/php-fpm.conf file uses the http user and is listening on the unix socket rather than the loopback IP address.
; Unix user/group of processes ; Note: The user is mandatory. If the group is not set, the default user's group ; will be used. user = http group = http ; The address on which to accept FastCGI requests. ; Valid syntaxes are: ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on ; a specific port; ; 'port' - to listen on a TCP socket to all addresses on a ; specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. ;listen = 127.0.0.1:9000 listen = /run/php-fpm/php-fpm.sock
Edit your /etc/nginx/nginx.conf file to be the same as below.
That should be everything configured, now to spin up the services and set them to start on boot.
sudo systemctl start php-fpm mysqld nginx sudo systemctl enable php-fpm mysqld nginx
Now navigate to your dynamic DNS name or your IP address in a browser and you should be greeted with an Anchor CMS set up screen. It will ask you for the name of the database you created and for you to set a username and password to be able to login to the management interface of the site which can be found under http://yoursitename/admin.
Thats it! Hopefully anyway. If you run into any problems you can try checking the Arch wiki for tips on configuration of each of the components. The Nginx error log can be found at /var/log/nginx/error.log if you followed the config above. The Anchor CMS set up screen also does a pretty good job of telling you if it needs something that doesn’t appear to be enabled.