[{"content":"Have you already the new open-source social network Mastodon ? I have launched few days ago my own instance to contribute to this project.\nIf you want to launch your own instance, here a quick tutorial to install mastodon on a Ubuntu 16.04 LTS server with Nginx as a reverse-proxy and Cloudflare CDN/SSL.\nTo follow the steps of this tutorial, a user with sudo rights is enough, you don\u0026rsquo;t need to login as root.\nInstall the dependencies sudo apt-get update Install nodejs\ncurl -sL https://deb.nodesource.com/setup_6.x | sudo bash - sudo apt-get install imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev nodejs sudo npm install -g yarn Install redis-server\nsudo apt-get install redis-server redis-tools Install Postgresql\nsudo apt-get install postgresql postgresql-contrib Login as postgre user to create mastodon\nsudo su - postgres psql CREATE USER mastodon CREATEDB; \\q You will also have to enable ident authentication so users can login without password\nsudo sed -i \u0026#39;/^local.*postgres.*peer$/a host all all 127.0.0.1/32 ident\u0026#39; \\ /etc/postgresql/9.?/main/pg_hba.conf And to install the ident daemon :\nsudo apt-get install pidentd sudo systemctl enable pidentd sudo systemctl start pidentd sudo systemctl restart postgresql Install Ruby Install the dependencies sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev Create a user mastodon without password :\nadduser --disabled-password --disabled-login mastodon Then login as mastodon :\nsu - mastodon Install rbenv and rbenv-build\ngit clone https://github.com/rbenv/rbenv.git ~/.rbenv echo \u0026#39;export PATH=\u0026#34;$HOME/.rbenv/bin:$PATH\u0026#34;\u0026#39; \u0026gt;\u0026gt; ~/.bashrc echo \u0026#39;eval \u0026#34;$(rbenv init -)\u0026#34;\u0026#39; \u0026gt;\u0026gt; ~/.bashrc source ~/.bashrc We have to logout to apply the bash modification, and we install ruby-build.\nexit su - mastodon git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build Then install ruby 2.4.1 for mastodon :\nrbenv install 2.4.1 rbenv global 2.4.1 You can check the ruby version installed with the command :\nruby -v Mastodon installation We have installed all the dependencies required to setup Mastodon, so we can now clone the github repository. We use git checkout to select the last release instead of the master branch. cd ~ git clone https://github.com/tootsuite/mastodon.git live cd live git checkout $(git tag | tail -n 1) Install bundler to manage the dependencies and disable the gem documentation\necho \u0026#34;gem: --no-document\u0026#34; \u0026gt; ~/.gemrc gem install bundler --no-ri Then launch the installation\nbundle install --deployment --without development test yarn install You can now copy the configuration sample file and edit with your own informations\ncp .env.production.sample .env.production nano .env.production You have to add the following informations :\n# Service dependencies REDIS_HOST=localhost REDIS_PORT=6379 DB_HOST=/var/run/postgresql DB_USER=mastodon DB_NAME=mastodon_production DB_PASS= DB_PORT=5432 # Federation LOCAL_DOMAIN=yourdomain.com LOCAL_HTTPS=true Ainsi que la partie SMTP qui permettra aux utilisateurs de confirmer leur inscription :\n# E-mail configuration SMTP_SERVER=mail.yourdomain.com SMTP_PORT=587 SMTP_LOGIN=noreply@yourdomain.com SMTP_PASSWORD=YourPassword SMTP_FROM_ADDRESS=noreply@yourdomain.com For the application secret part, you can use the command bundle exec rake secret to generate the 3 secret keys, then you have just to copy them into the configuration file.\nTo setup the database and the assets :\nRAILS_ENV=production bundle exec rails db:setup RAILS_ENV=production bundle exec rails assets:precompile Adding systemd services Web service nano /etc/systemd/system/mastodon-web.service [Unit] Description=mastodon-web After=network.target [Service] Type=simple User=mastodon WorkingDirectory=/home/mastodon/live Environment=\u0026#34;RAILS_ENV=production\u0026#34; Environment=\u0026#34;PORT=3000\u0026#34; ExecStart=/home/mastodon/.rbenv/shims/bundle exec puma -C config/puma.rb TimeoutSec=15 Restart=always [Install] WantedBy=multi-user.target Background service nano /etc/systemd/system/mastodon-sidekiq.service [Unit] Description=mastodon-sidekiq After=network.target [Service] Type=simple User=mastodon WorkingDirectory=/home/mastodon/live Environment=\u0026#34;RAILS_ENV=production\u0026#34; Environment=\u0026#34;DB_POOL=5\u0026#34; ExecStart=/home/mastodon/.rbenv/shims/bundle exec sidekiq -c 5 -q default -q mailers -q pull -q push TimeoutSec=15 Restart=always [Install] WantedBy=multi-user.target API service\nnano /etc/systemd/system/mastodon-streaming.service [Unit] Description=mastodon-streaming After=network.target [Service] Type=simple User=mastodon WorkingDirectory=/home/mastodon/live Environment=\u0026#34;NODE_ENV=production\u0026#34; Environment=\u0026#34;PORT=4000\u0026#34; ExecStart=/usr/bin/npm run start TimeoutSec=15 Restart=always [Install] WantedBy=multi-user.target Then we can enable our systemd services :\nsystemctl enable /etc/systemd/system/mastodon-*.service And we can start our mastodon instance :\nsudo systemctl start mastodon-web.service mastodon-sidekiq.service mastodon-streaming.service Add the required crons for mastodon :\ncrontab -u mastodon -e RAILS_ENV=production @daily cd /home/mastodon/live \u0026amp;\u0026amp; RAILS_ENV=production /home/mastodon/.rbenv/shims/bundle exec rails mastodon:media:remove_remote Nginx reverse-proxy setup : So we have setup mastodon, but to access to our instance directly under https and with our domain, we need to setup a reverse-proxy using Nginx. At first, install Nginx :\nwget -O - https://nginx.org/keys/nginx_signing.key | sudo apt-key add - sudo echo \u0026#34;deb http://nginx.org/packages/ubuntu/ $(lsb_release -sc) nginx\u0026#34; \u0026gt; /etc/apt/sources.list.d/nginx.list sudo apt update sudo apt install nginx We have now to create our nginx configuration file for ou domain, we will use the configuration based on the Angristan\u0026rsquo;s model :\nnano /etc/nginx/sites-enabled/yourdomain.com map $http_upgrade $connection_upgrade { default upgrade; \u0026#39;\u0026#39; close; } server { listen 80; listen [::]:80; server_name www.yourdomain.com yourdomain.com; return 301 https://votredomaine.com$request_uri; access_log /dev/null; error_log /dev/null; } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name www.yourdomain.com yourdomain.com; access_log /var/log/nginx/yourdomain.com-access.log; error_log /var/log/nginx/yourdomain.com-error.log; ssl_certificate /etc/letsencrypt/live/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/privkey.pem; ssl_protocols TLSv1.2; ssl_ciphers EECDH+AESGCM:EECDH+AES; ssl_prefer_server_ciphers on; add_header Strict-Transport-Security \u0026#34;max-age=15552000; preload\u0026#34;; keepalive_timeout 70; sendfile on; client_max_body_size 0; gzip off; root /home/mastodon/live/public; location / { try_files $uri @proxy; } location @proxy { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_pass_header Server; proxy_pass http://127.0.0.1:3000; proxy_buffering off; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; tcp_nodelay on; } location /api/v1/streaming { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_pass http://127.0.0.1:4000; proxy_buffering off; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; tcp_nodelay on; } error_page 500 501 502 503 504 /500.html; } You can start nginx with the command :\nservice nginx start Then we will use Let\u0026rsquo;s Encrypt to generate a SSL certificate.\ncd /opt git clone https://github.com/letsencrypt/letsencrypt cd letsencrypt ./letsencrypt-auto certonly --webroot -w /home/mastodon/live -d www.yourdomain.com -d yourdomain.com --email vous@yourdomain.com --text --rsa-key-size 4096 Updating Mastodon Mastodon is updated very often, so if you want to keep your instance up-to-date you will have to follow the following steps : su - mastodon cd live gem install bundler --no-ri git fetch git checkout v1.X.X bundle install --deployment --without development test NODE_ENV=production npm upgrade --global yarn yarn install RAILS_ENV=production bundle exec rails assets:clean RAILS_ENV=production bundle exec rails assets:precompile RAILS_ENV=production bundle exec rails db:migrate exit Then you just have to restart the instance :\nsudo systemctl restart mastodon-web.service mastodon-sidekiq.service mastodon-streaming.service If you need to update ruby with a new release use :\nrbenv install 2.4.1 gem install bundler --no-ri Create your administrator account You instance is now running properly but you have to register to create your account and then you will be able to set this account as administrator with the following command : RAILS_ENV=production bundle exec rails mastodon:make_admin USERNAME=votre-utilisateur My instance mastodon.top ![mastodon.top\u0001/images/2017/08/Screenshot_44.png) With VirtuBox, I have launched a Mastodon instance and if you are not registered on Mastodon yet, you can register at mastodon.top. We are already more than 200 users on my instance and enough resources for more users. You can find more informations about the instance on the page about and the real-time monitoring of the server at instance.mastodon.top. Don\u0026rsquo;t hesitate to give your opinion on Mastodon, to tell me if there are errors in the tutorial or to ask for help if you want to deploy your own instance.\nYou can also follow me on Mastodon : thomas_virtubox@mastodon.top\n","date":"2017-04-06T10:06:00Z","image":"/images/2017/08/Screenshot_40.png","permalink":"/how-to-install-mastodon-ubuntu/","title":"How to install a Mastodon instance on Ubuntu 16.04 LTS"},{"content":"If you are using a self-hosted Ghost, you may have sometimes to upgrade it to the new release. To do that, you have at first to download the latest Ghost release. For that create a new folder next your current Ghost folder and download Ghost :\nmkdir newghostfolder \u0026amp;\u0026amp; cd newghostfolder wget https://ghost.org/zip/ghost-latest.zip unzip ghost-latest.zip You can make a copy of your current ghost folder and you will have to remove the index.js, all the .md and .json and the core folder. But do not delete the config.js file. Then you will have to stop the current Ghost instance by using :\nforever stop index.js Copy the new files over your current folder, and install the new dependencies with :\nnpm install --production After than you can restart your instance\nNODE_ENV=production forever start index.js ","date":"2017-02-16T14:21:00Z","image":"/images/2017/02/Screenshot_8.png","permalink":"/how-to-upgrade-ghost/","title":"How to upgrade Ghost"},{"content":"Because there is nothing better than self-hosting, you are may looking for a way to manage your apps easily and to be able to host yourself all your web apps ?\nI have tried several solutions in the past, but there was always something wrong and I was looking for something easy to deploy and stable.\nCloudron is a platform to run and manage your apps, and if it was only available on AWS EC2 servers, it can be now deployed on any platform, including Scaleway, OVH, DigitalOcean or Linode.\nThere are a large choice of apps available on the Cloudron App Store which can be deployed with a single click.\nCloudron also provide the ability to backup your server with AWS S3 storage, and keep your server and your apps always up-to-date.\nSo ton install Cloudron you only need :\nclean Ubuntu 16.04 LTS with 1GB+ RAM SSH keys connection domain with a wildcard record to your server ip Because Cloudron will install each application on a new subdomain, so you have to purchase a domain and to use a wildcard if you don\u0026rsquo;t want to add each record manually.\nI recommand you to buy a .xyz domain at NameCheap and then to use Cloudflare DNS.\nTo install Cloudron, the first subdomain needed will be my.yourdomain.com, it will be your homepage.\nThen you have to run the following command :\nwget https://git.cloudron.io/cloudron/box/raw/master/scripts/cloudron-setup chmod +x cloudron-setup ./cloudron-setup --domain \u0026lt;domain\u0026gt; --provider \u0026lt;digitalocean|ec2|generic|scaleway\u0026gt; You will have to replace :\n\u0026lt;domain\u0026gt; with yourdomain.xyz \u0026lt;provider\u0026gt; with the provider name or generic When the process will be done, you will have to go to my.yourdomain.xyz to finish the setup and create your admin account. There is no maintenance needed with Cloudron but you can read the documentation .\n","date":"2016-12-17T02:03:49Z","image":"/images/2016/12/Cloudron--4-.png","permalink":"/self-hosting-platform-cloudron/","title":"Self-Hosting made easy with Cloudron"},{"content":"If you have already setup redis-server for object-caching with WordPress, you are maybe looking for something more powerful to setup ? Magento 2 will be the perfect benchmark for your server. It\u0026rsquo;s an open source e-commerce software and content management system for e-commerce websites based on the PHP Zend Framework. Magento is compatible with the most advanced caching systems including Varnish, Memcached or Redis.\nSo in this tutorial, we will see how to setup Magento 2.1.7 with Nginx, php7, Mariadb and Redis-server using EasyEngine.\nAt first, you need a VPS with ubuntu/debian and at least 2GB RAM. In production, 4GB will be the minimum, when 8GB will be better.\nServer setup \u0026amp; configuration\r## install easyengine wget -qO ee rt.cx/ee \u0026amp;\u0026amp; bash ee ## install Nginx - php5.6 + php7 - Mariadb - phpmyadmin - redis - memcached ee stack install --web --admin --php7 --redis ## create your domain vhost (--letsencrypt optional) ee site create yourdomain.com --mysql --php7 ## install php-intl for magento and unzip apt-get update \u0026amp;\u0026amp; apt-get install php7.0-intl unzip Change the php configuration according to magento documentation :\n## change php.ini settings for magento nano /etc/php/7.0/fpm/php.ini max_execution_time = 1800 max_input_time = 1800 memory_limit = 4096M post_max_size = 512M ## add the following lines after the extension declaration : [opcache] opcache.enable=1 opcache.enable_cli=0 opcache.memory_consumption=128 opcache.interned_strings_buffer=4 opcache.max_accelerated_files=20000 opcache.max_wasted_percentage=5 opcache.validate_timestamps=1 opcache.revalidate_freq=2 opcache.optimization_level=0xffffffff ## restart php7.0-fpm service php7.0-fpm restart Magento installation\rWe have already done almost all the server configuration. Now we have to download magento and to launch the installer.\nDownload it from the Magento website : https://magento.com/tech-resources/download\nTo upload it via sftp, set a password for the user www-data with the command\npasswd www-data Then allow shell access for www-data with the command :\nusermod -s /bin/bash www-data After that you will be able to use the sftp client of your choice and to upload the magento archive in your website folder with the correct permissions. If you are looking for a sftp client for Windows, I recommend you Cyberduck.\nThen go into your website folder and unzip the magento archive.\ncd /var/www/yourdomain.com/htdocs unzip Magento-CE-2.1.6_sample_data-2017-03-29-04-34-51.zip ## set www-data as the owner of the directory and all magento files cd .. chown -R www-data:www-data htdocs But to be able to launch the installer with nginx, we have to edit the site configuration, for that we will use the nginx.conf.sample file included with magento.\nI have edit this file with the correct settings for EasyEngine and you can download it here : magento.conf\nYou have just to upload this file in /var/www/yourdomain.com/conf/nginx, because with easyengine, all configurations files in this folder are automatically include in your website configuration.\nThen edit your website configuration in /etc/nginx/sites-available/yourdomain.com to look like :\nserver { server_name yourdomain.com www.yourdomain.com; set $MAGE_ROOT /var/www/yourdomain.com/htdocs; access_log /var/log/nginx/yourdomain.com.access.log rt_cache; error_log /var/log/nginx/yourdomain.com.error.log; include /var/www/yourdomain.com/conf/nginx/*.conf; } Check your nginx configuration with the command nginx -t and apply it with service nginx reload\nWe can now launch the installation by reaching the domain with our browser Just follow the step, and use the databases user credentials available in the file /var/www/yourdomain.com/ee-config.php\nTo run properly, Magento require to add some cronjobs. If you are already logged as www-data, you have just to use the command : crontab -e and to add the following lines. Just replace yourdomain.com with your real domain.\n* * * * * php /var/www/yourdomain.com/htdocs/bin/magento cron:run | grep -v \u0026#34;Ran jobs by schedule\u0026#34; \u0026gt;\u0026gt; /var/www/yourdomain.com/htdocs/var/log/magento.cron.log * * * * * php /var/www/yourdomain.com/htdocs/update/cron.php \u0026gt;\u0026gt; /var/www/yourdomain.com/htdocs/var/log/update.cron.log * * * * * php /var/www/yourdomain.com/htdocs/bin/magento setup:cron:run \u0026gt;\u0026gt; /var/www/yourdomain.com/htdocs/var/log/setup.cron.log Some other useful command to get started with the magento cli\n## deploy the magento sample data php bin/magento sampledata:deploy ## upgrade your magento install php bin/magento setup:upgrade ## Generates DI configuration after setup:upgrade php bin/magento setup:di:compile ## clean magento cache php bin/magento cache:clean ## backup magento php bin/magento setup:backup Your Magento instance is now running properly, but we want to make it faster. For that we will use redis for session storage and full-page caching. I let you read the Magento DevDocs to understand why Redis is better.\nUse redis for session and page cache\rSo, to use Redis-server, there are no plugins like for WordPress, but we have just to edit the file app/etc/env.php and to set the correct settings to use redis for the session storage and the full page caching instead of files. You can use the following example : env.php\nThere are two blocks to add to use redis-server, it require to use a database for each block :\nsession caching \u0026#39;session\u0026#39; =\u0026gt; array ( \u0026#39;save\u0026#39; =\u0026gt; \u0026#39;redis\u0026#39;, \u0026#39;redis\u0026#39; =\u0026gt; array ( \u0026#39;host\u0026#39; =\u0026gt; \u0026#39;127.0.0.1\u0026#39;, \u0026#39;port\u0026#39; =\u0026gt; \u0026#39;6379\u0026#39;, \u0026#39;password\u0026#39; =\u0026gt; \u0026#39;\u0026#39;, \u0026#39;timeout\u0026#39; =\u0026gt; \u0026#39;2.5\u0026#39;, \u0026#39;persistent_identifier\u0026#39; =\u0026gt; \u0026#39;magento2:\u0026#39;, \u0026#39;database\u0026#39; =\u0026gt; \u0026#39;1\u0026#39;, \u0026#39;compression_threshold\u0026#39; =\u0026gt; \u0026#39;2048\u0026#39;, \u0026#39;compression_library\u0026#39; =\u0026gt; \u0026#39;gzip\u0026#39;, \u0026#39;log_level\u0026#39; =\u0026gt; \u0026#39;1\u0026#39;, \u0026#39;max_concurrency\u0026#39; =\u0026gt; \u0026#39;6\u0026#39;, \u0026#39;break_after_frontend\u0026#39; =\u0026gt; \u0026#39;5\u0026#39;, \u0026#39;break_after_adminhtml\u0026#39; =\u0026gt; \u0026#39;30\u0026#39;, \u0026#39;first_lifetime\u0026#39; =\u0026gt; \u0026#39;600\u0026#39;, \u0026#39;bot_first_lifetime\u0026#39; =\u0026gt; \u0026#39;60\u0026#39;, \u0026#39;bot_lifetime\u0026#39; =\u0026gt; \u0026#39;7200\u0026#39;, \u0026#39;disable_locking\u0026#39; =\u0026gt; \u0026#39;0\u0026#39;, \u0026#39;min_lifetime\u0026#39; =\u0026gt; \u0026#39;60\u0026#39;, \u0026#39;max_lifetime\u0026#39; =\u0026gt; \u0026#39;2592000\u0026#39;, ), Full-page caching \u0026#39;cache\u0026#39; =\u0026gt; array( \u0026#39;frontend\u0026#39; =\u0026gt; array( \u0026#39;default\u0026#39; =\u0026gt; array( \u0026#39;backend\u0026#39; =\u0026gt; \u0026#39;Cm_Cache_Backend_Redis\u0026#39;, \u0026#39;backend_options\u0026#39; =\u0026gt; array( \u0026#39;server\u0026#39; =\u0026gt; \u0026#39;127.0.0.1\u0026#39;, \u0026#39;port\u0026#39; =\u0026gt; \u0026#39;6379\u0026#39;, ), ), \u0026#39;page_cache\u0026#39; =\u0026gt; array( \u0026#39;backend\u0026#39; =\u0026gt; \u0026#39;Cm_Cache_Backend_Redis\u0026#39;, \u0026#39;backend_options\u0026#39; =\u0026gt; array( \u0026#39;server\u0026#39; =\u0026gt; \u0026#39;127.0.0.1\u0026#39;, \u0026#39;port\u0026#39; =\u0026gt; \u0026#39;6379\u0026#39;, \u0026#39;database\u0026#39; =\u0026gt; \u0026#39;3\u0026#39;, \u0026#39;compress_data\u0026#39; =\u0026gt; \u0026#39;0\u0026#39;, ), ), ), ), You can now refresh the Magento cache to make sure you are using Redis. You can also use EasyEngine to install phpRedisAdmin to see the redis databases with ee stack install --phpredisadmin\nMultiple stores configuration\rThat\u0026rsquo;s one of the main feature of Magento, the ability to host several stores/websites on the same magento instance. At first you have to create a new website, store and store view in the Admin panel. For this part just follow the Magento Guide. Then create your additional nginx vhost with :\nee site create your2domain.com And edit it to look like :\nserver { server_name your2domain.com www.your2domain.com; access_log /var/log/nginx/your2domain.com.access.log ; error_log /var/log/nginx/your2domain.com.error.log; set $MAGE_ROOT /var/www/yourdomain.com/htdocs; index index.html index.htm; include /var/www/yourdomain.com/conf/nginx/*.conf; } You have to make sure you have included the same magento.conf file than for the main website. After that we have to use the Nginx map directive to pass the values of the Magento variables to nginx, so we will create a file map.conf in /etc/nginx/conf.d with the following content :\nmap $http_host $MAGE_RUN_CODE { yourdomain.com yourdomain-code; your2domain.com your2domain-code; } So if you want to add another store later, you will just have to create another vhost and to add a line in this file with the new domain and the associated website code. Then edit the file /etc/nginx/fastcgi_params and add the following line at the end :\nfastcgi_param MAGE_RUN_TYPE website; fastcgi_param MAGE_RUN_CODE $MAGE_RUN_CODE; Reload nginx with nginx -t \u0026amp;\u0026amp; service nginx reload and you can now check if your two stores are working properly.\nIf you have any issue to setup Magento with EasyEngine, post a reply on the Magento thread already available. I will answer to your questions.\n","date":"2016-11-07T20:49:00Z","image":"/images/2016/11/magento_logo_footer-1.png","permalink":"/setup-magento-2-easyengine-nginx-redis-cache/","title":"How to setup Magento 2.1.7 with EasyEngine - Nginx \u0026  Redis-cache"},{"content":"I\u0026rsquo;m using WordPress for few years now, but that\u0026rsquo;s always the same problem, WordPress require plugins to have some functionalities and plugins make WordPress running slower.\nEven with an advanced caching system like redis, that\u0026rsquo;s always a lot of work to make wordpress running fast and safe.\nSo I have done some tests with Ghost using Docker, and it\u0026rsquo;s really the perfect blog solution for me, because it already include all the features needed to write an article. No need to look for a plugin to improve SEO or to install a caching system. You can write you articles in markdown, work with slack and use it as a team, and the theme system is really clean and lightweight.\nBut I can\u0026rsquo;t post this article without making a tutorial about Ghost.\n1) Install NodeJs v4 LTS\rwget https://deb.nodesource.com/setup_4.x chmod +x setup_4.x ./setup_4.x apt-get install nodejs -y 2) Install Ghost\rmkdir /var/www/ghost cd /var/www/ghost curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip unzip ghost.zip npm install --production 3) Starting Ghost\rnpm start --production Then you can access to your blog using http://localhost:2368/ghost/signup All the configuration can be found in the file config.js.\nBut as you can see, we have to use the port 2368 to access to Ghost. To fix that, the easiest is to use Nginx as reverse proxy. Let\u0026rsquo;s use easyengine !\n## install easyengine wget -qO ee rt.cx/ee \u0026amp;\u0026amp; bash ee ## create a proxy with your domain ee site create anystack.xyz --proxy=127.0.0.1:2368 Then you will be able to use your domain to access to ghost. Don\u0026rsquo;t forget to change your blog url in config.js. And if you want to run Ghost forever, so use forever \u0026hellip;\nnpm install forever -g ## start ghost NODE_ENV=production forever start index.js ## stop ghost forever stop index.js Last tips ? How to use Ghost with Nginx as reverse proxy with Cloudflare SSL. Go into you Cloudflare account and in the Crypto tabs, create your origin certificate.\nThen create a first file yourdomain-pvkey.pem with the private key generated by Cloudflare. And another file yourdomain-crt.pem with the origin certificate from cloudflare but also the Cloudflare root certificate you can find here\nThen your nginx conf for you domain should look like\nserver { server_name anystack.xyz; listen 443 ssl http2; ssl on; ssl_certificate /etc/nginx/ssl/anystack-crt.pem; ssl_certificate_key /etc/nginx/ssl/anystack-key.pem; access_log /var/log/nginx/dev.anystack.xyz.access.log rt_cache; error_log /var/log/nginx/dev.anystack.xyz.error.log; location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://127.0.0.1:2368/; } } And if you want to add a redirect from http to a https, create a file yourdomain.com-ssl.conf in /etc/nginx/conf.d with\nserver { listen 80; server_name anystack.xyz; return 301 https://anystack.xyz$request_uri; } ","date":"2016-10-26T13:54:29Z","image":"/images/2016/11/Ghost-Transparent-for-LIGHT-BG-1.png","permalink":"/good-bye-wordpress-welcome-ghost/","title":"Good bye WordPress - Welcome Ghost !"},{"content":"You want to improve your pagespeed score by optimizing your images in WordPress ? But you don\u0026rsquo;t want to pay a subscription for a plugin ? If you are using a VPS or a dedicated server, you don\u0026rsquo;t need any plugin to optimize all your images easily.\nFor that you can use this script :\n# For debian/Ubuntu wget -qO optimize.sh https://git.virtubox.net/virtubox/wp-optimize/raw/master/deb-wp-optimize.sh \u0026amp;\u0026amp; bash optimize.sh #For Centos/RedHat cd /var/www wget -qO optimize.sh https://git.virtubox.net/virtubox/wp-optimize/raw/master/centos-wp-optimize.sh \u0026amp;\u0026amp; bash optimize.sh If you want to do the process manually\n# Debian/Ubuntu apt-get update \u0026amp;\u0026amp; apt-get install optipng jpegoptim -y # Centos yum update \u0026amp;\u0026amp; yum install optipng jpegoptim -y Then you just have to go in your web directory and to run the following commands :\ncd /var/www find . -name *.jp* | xargs jpegoptim --strip-all -m76 find . -iname \u0026#39;*.png\u0026#39; -print0 | xargs -0 optipng -o7 -preserve ","date":"2016-10-23T05:52:28Z","image":"/images/2016/10/Optimize--2--min.png","permalink":"/optimize-wordpress-images-without-plugin/","title":"Optimize easily your WordPress images without any plugin"},{"content":"WordPress use wp-cron to check updates for themes, plugins and some other process but it could have an impact on your website speed because WordPress execute it on every page-loading. So if you have a lot of traffic, it will (no benchmark proof at the moment) delay page loading for users.\nSo if you are using a linux server (VPS or dedicated), you can easily create a cron job to run it each 5 minutes or each 10 minutes. But remember WordPress need wp-cron to work properly, so don\u0026rsquo;t disable it totally !\nTo disable wp-cron, just add the following line in wp-config.php :\ndefine(\u0026#39;DISABLE_WP_CRON\u0026#39;, true); Then to add a cronjob you have to a :\n## Run the crontab with your server or vhost user crontab -u yourserveruser -e ## method 1 : using curl to run the script */10 * * * * curl http://example.com/wp-cron.php \u0026gt; /dev/null 2\u0026gt;\u0026amp;1 ## method 2 : using php to run it */10 * * * * cd /var/www/example.com/htdocs; php /var/www/example.com/htdocs/wp-cron.php \u0026gt; /dev/null 2\u0026gt;\u0026amp;1 The first method use PHP-CGI when the second use PHP-CLI, the only difference is CLI does not have time limit to run a script. Because this way, the wp-cron will not impact page loading speed, it\u0026rsquo;s highly recommended to use linux cron instead of default WordPress cron.\nYou can change */10 with */5 to run the cron each 5 minutes instead of each 10 minutes.\n","date":"2016-09-15T05:54:00Z","image":"/images/2016/10/AnyStack---wp-cron--2--1.png","permalink":"/making-wordpress-faster-running-wp-cron-linux/","title":"Making WordPress faster by running wp-cron with Linux"},{"content":"I have already write some articles about EasyEngine, and I\u0026rsquo;m really in love with this command line tool, because it make Nginx easier to use than Apache. But I haven\u0026rsquo;t talk about all functionality of EE yet. If it provide you the ability to setup a WordPress website easily, you can also use EasyEngine to create a vhost for a static html website \u0026hellip; Or use Nginx as a reverse proxy !\nAnd that make of EE the most complete tool available to use Nginx without having to read thousands of documentation pages to understand how to create a vhost. But don\u0026rsquo;t worry, this article will not only talk about this awesome tool which is EasyEngine.\nI have used docker several times in the past, because it\u0026rsquo;s the fastest way to test an application without having to setup a VPS especially for that. But to run several Docker containers in a single VPS, it could quickly be a problem because some container provide you the ability to use a domain like WordPress for example. And some other will use directly your VPS IP and the port of your choice, which is not very friendly when your app is running on http://192.168.0.1:3000 \u0026hellip;\nThat\u0026rsquo;s why we will use Nginx to act as a reverse proxy for our Docker containers, and we will be able to run several containers on the same server and to access them with the domain of our choice. So the first step is to install Docker. Don\u0026rsquo;t worry you should not need to read the documentation if you are using a VPS with a recent linux distribution and a kernel 3.13+\n### install Docker with a single command on debian/ubuntu/centos wget -qO- https://get.docker.com/ | sh Docker is now running on your server ! So let\u0026rsquo;s install EasyEngine :\n## Install EasyEngine Debian7/8 or Ubuntu 14.04/16.04 LTS wget -qO ee rt.cx/ee \u0026amp;\u0026amp; bash ee So we have now Docker and EasyEngine installed and we can launch our first Docker App before routing it with Nginx. We will start with Rocket.Chat, a complete live chat solution to build a community or to provide live support.\n## Launch MongoDB container docker run --name db -d mongo:3.0 --smallfiles ## Run Rocket.Chat linked to the db and expose port 3000 docker run --name rocketchat -p 3000:3000 --env ROOT_URL=http://localhost --link db -d rocket.chat So you should be able to access to Rocket.Chat using http://YOUR-VPS-IP:3000. And to use Nginx as reverse proxy with your domain :\nee site create yourdomain.com --proxy=127.0.0.1:3000 That\u0026rsquo;s it ! You can now use http://yourdomain.com to access to Rocket.Chat\nSome other apps to run with Nginx as reverse proxy :\n## Hastebin docker run --name redis -d redis docker run --name hastebin -d -p 7777:7777 --link redis:redis -e STORAGE_HOST=redis rlister/hastebin ## Pasteboard docker run --name pasteboard -e ORIGIN=mydomain.tld -e MAX=7 -v /srv/pasteboard/images:/pasteboard/public/storage -p 4000:4000 anthodingo/docker-pasteboard ","date":"2016-09-04T06:57:00Z","image":"/images/2016/10/dockeenginx-1.png","permalink":"/how-nginx-reverse-proxy-docker/","title":"How to use Nginx as reverse proxy with Docker"},{"content":"Today a very small post to talk about NIXStats, a new server and domains monitoring service currently in beta and totally free. You can monitor your server using a bash script or a python script and you domain to receive an alert in case of downtime. You can also have some stats about your server speed so I recommend you to test it during the beta.\n","date":"2016-08-25T06:56:00Z","image":"/images/2016/10/anystack.xyz-monitoring.png","permalink":"/nixstats-server-domains-monitoring/","title":"NIXStats - Server and domains monitoring"},{"content":"Few years ago, the HTTPs protocol was slower than the http, due the the initial handshake of any SSL transaction. But with the HTTP2, there are several improvements available and some rules have change when we talk about web optimization. Most of the PageSpeed tools will recommend you to use domain sharding or to combine your assets to have a website faster. But is it still true ?\nThe most important feature of the HTTP2 is the multiplexing, it allow to download multiple files with an unique TCP connection when we have to open a new one for each file in HTTP1.1\n1) No more assets concatenation We used to combine as much as possible our assets with HTTP1.1, that\u0026rsquo;s not true with HTTP2 anymore. Because if it reduce the size of the requests done, it also make the rules for caching harder to define and could have bad results if you don\u0026rsquo;t need a part of the assets on each page of your website\n2) No more domain sharding It was already a \u0026ldquo;trick\u0026rdquo; but the domain sharding is not a part of the past. It was used to open more TCP connection than a browser was supposed to. But you will have a negative result by using it with HTTP2 because it will only require unnecessary DNS request and more if the connection is established under TLS.\nBut there are also rules which are still Best Pratices to have a fast website\nReduce DNS lookup -\u0026gt; store all assets on the same domain or with a CDN Browser Caching Minimize HTTP Requests -\u0026gt; cookies and query strings Minimize HTTP Response -\u0026gt; Minify your assets ","date":"2016-08-11T06:48:00Z","image":"/images/2016/10/diagram-asynchronous-resource-loading.png","permalink":"/http2-web-optimization-fast-website-2016/","title":"HTTP2 \u0026 Web Optimization - How to have a fast website in 2016"},{"content":"Cloudflare SSL : 3 security levels You are maybe aware than https will become a standard for all websites in the next few years, because it\u0026rsquo;s encrypt the connection between your visitors and your website, making it safer for them.\nWith Cloudflare you have 3 level of SSL security. The first one name \u0026ldquo;Flexible\u0026rdquo; will not require you to install SSL on your server, acting as a proxy Cloudflare will only use SSL between your visitors and their servers. If your visitors will be able to navigate on your website with an encrypted connexion, this configuration is not really secured as anyone can intercept data between cloudflare and your server. This kind of attack are named \u0026ldquo;man-in-the-middle\u0026rdquo;. The second level of SSL with cloudflare will require for you to setup a valid SSL certificate. That doesn\u0026rsquo;t mean you will have top pay for that. You can use letsencrypt to secure your server, and then use cloudflare in \u0026ldquo;Full SSL\u0026rdquo; to have this time a totally secured connection between your server and your visitor.\nFor me, if you want to use SSL, the Full SSL is the minimum to setup. The flexible mode is really useless as it doesn\u0026rsquo;t protect properly your visitors. And the next level the Full \u0026ldquo;Strict\u0026rdquo; will require a valid certificate, signed by a trusted authority. This also require to use the HSTS, which is a mechanism to force a browser to use ssl on a website for a fixed period. That mean, if your website don\u0026rsquo;t use SSL all the time, any modern browser will block the connection to protect the user. So when you are using HSTS, you have to be sure than the SSL certificate will always be valid. This is the most secure level to setup with Cloudflare, but it should not be required if you don\u0026rsquo;t need a very high-level of security to process credit card or other transaction.\nHow to use https instead of http ? At first you have to be sure than all the content available on your website can be delivered to your visitors using https. That mean you will have to check your if there are not some external css or javascript which is process using http. The easiest way to have files compatible under https is to link all your assets like that :\n\u0026lt;link rel=\u0026#34;stylesheet\u0026#34; href=\u0026#34;//thedomain.com/css/yourtheme.css\u0026#34; type=\u0026#34;text/css\u0026#34; /\u0026gt; But even with this method, if a file could not be processed under https, it will be blocked by the visitor\u0026rsquo;s browser and it will not see the green padlock in his browser. So check properly the sources of your assets, there are a lot of wordpress themes which still request google fonts using http.\nSo now, we will use letsencrypt to get a free SSL certificate. But before, if you are already using Cloudflare, you will have to disable the proxy mode, because to validate your domain ownership, letsencrypt create a small file named \u0026ldquo;.well-known\u0026rdquo; on your webspace and try to access it by resolving your IP. That mean if you are using Cloudflare, it will try to validate the proxy and it will fail.\nFor Apache on Ubuntu/Debian :\napt-get install git git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt cd /opt/letsencrypt ## you can use it also for a subdomain like -d subdomain.example.com ./letsencrypt-auto --apache -d example.com -d www.example.com Let\u0026rsquo;s do the same with Nginx\napt-get install git git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt cd /opt/letsencrypt ./letsencrypt-auto certonly --webroot -w /var/www/example.com/htdocs/ -d example.com -d www.example.com --email contact@example.com --text --agree-tos ## then to activate it with Nginx, add this on your server { } config listen 443 ssl http2; ssl on; ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; ## and reload nginx nginx -t \u0026amp;\u0026amp; service nginx reload ## And if you want to force http to https nano /etc/nginx/conf.d/force-ssl.conf ## then add server { listen 80; server_name example.com; return 301 https://example.com$request_uri; } And if you want to renew automatically your certificate, it\u0026rsquo;s not very hard\n## to renew automatically your certificate sudo crontab -e ## then enter 30 2 * * 1 /opt/letsencrypt/letsencrypt-auto renew \u0026gt;\u0026gt; /var/log/le-renew.log ## to update letsencrypt cd /opt/letsencrypt sudo git pull So, you have now a valid SSL certificate, and you should see the small green padlock in your browser. And you can now use Cloudflare in \u0026ldquo;Full SSL\u0026rdquo; and that mean your website should be safer for your visitors.\nAnd the last level of security with Cloudflare is now really easier, because it was required to buy an SSL certificate in the past, it\u0026rsquo;s now over because Cloudflare will issue it for you, and it\u0026rsquo;s totally free. So you will have to go to your Cloudflare account in the crypto tabs of your domain. And in the section Origin certificates, you will be able to create a certificate, and then to install it on your server by following the tutorials available for each web server.\nBut if you are using a control panel like Plesk, it doesn\u0026rsquo;t work the same than with a classic web server. It will require to create a CSR (Certificate Signing request) like if you are planning to buy a certificate. But you will just have to enter your personal details, and then to click on request to have the CSR and you private key. Then you just have to download the .pem file and to open it will a text editor to copy the details at Cloudflare. And it will give you the certificate to add in your control panel. BUT you will also have to enter the Cloudflare root certificate which is the authority to validate it. It take me few hours to find the post about it on the Cloudflare knowledge base : Root Certificate Cloudflare\nSo you should have your CSR on your control panel, and you private key, your certificate and the root authority, and you will just have to copy them in the text area available to have a real certificate, validated by an authority. It will allow you to use the Cloudflare \u0026ldquo;Full SSL (Strict)\u0026rdquo; mode which is the last security level with Cloudflare. So all the data between your visitors and your website will be fully encrypted, and you should have the best result at SSLabs when you will test the security level of your SSL server.\nAnd when the https was slower than http few years ago, because it require an initial handshake during the first connection, it include now several features and the biggest one is the HTTP2.\nBut I will write another post about that later, because it will require a complete article.\n","date":"2016-08-10T04:56:00Z","image":"/images/2016/10/ssl-cert-diagram-sha1-2-cert-optimization.png","permalink":"/cloudflare-speed-protect-secure/","title":"HOW CLOUDFLARE SPEED UP AND PROTECT YOUR WEBSITE – PART 2."},{"content":"I was using a VPS with Plesk Onyx to host the Blog, but even with Redis in a Docker container to make it faster, it wasn\u0026rsquo;t enough \u0026hellip;\nSo I have setup a small VPS on my dedicated server with Ubuntu 16.04 LTS using VMware vSphere 6. I will make another post about virtualization but in this post, we will talk only about the VPS setup with easyengine, which is really my favorite tool for WordPress setup. You can also read my first post about easyengine : Here\nFirst step, easyengine install :\nwget -qO ee rt.cx/ee \u0026amp;\u0026amp; bash ee Then WordPress setup :\nee site create anystack.xyz --wpredis --php7 --letsencrypt And it\u0026rsquo;s already good for the server setup with nginx, php7, mariadb, redis-cache and let\u0026rsquo;s encrypt for the SSL. Check your DNS are pointing to your server before launching let\u0026rsquo;s encrypt or it will fail to setup the SSL certificate.\nBut the work is not finished yet, because I have to upload my database and my files to get my content back. For that i will need to have access to the database, so let\u0026rsquo;s do that with phpmyadmin :\nee stack install --phpmyadmin phpmyadmin is now available at http://my-server-ip:22222\nButt protected by an ACL, and to change the user and the password, you just have to use :\nee secure --auth And to have your login details for phpmyadmin :\nee site info anystack.xyz So I have now uploaded my database, and I need my files. But it\u0026rsquo;s not needed to install ftp. The easiest way to do, is to add a password to www-data and to allow sftp access :\npasswd www-data And you will just have to replace /usr/sbin/nologin by /bin/bash in the file /etc/passwd. As FTP/SFTP client, I use Cyberduck which is the fastest client I have found, and you can use it for almost all protocol, including S3 storage at AWS or Google Drive.\nAfter uploading my files, just have to purge the redis cache, and that\u0026rsquo;s already over. ","date":"2016-08-05T18:59:00Z","image":"/images/2016/10/wordpressvps.png","permalink":"/new-vps-blog-setup-guide/","title":"New VPS for the Blog - Setup Guide"},{"content":" Because I have started using it only few days ago, I have to make a small article about it. If you are using TinyMCE on WordPress, you should already have more functionality for the code rendering in an article. But if you want to have beautiful colors and perfectly readable code there is a small jquery plugin for that.\n///////////////////////////////////////////////////////////////// highlightjs ///////////////////////////////////////////////////////////////// This small jquery code will automatically color 162 languages with 74 styles available. So let\u0026rsquo;s see how to use it ! You just have to add this code in your theme header:\n\u0026lt;link rel=\u0026#34;stylesheet\u0026#34; href=\u0026#34;//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/railscasts.min.css\u0026#34;\u0026gt; \u0026lt;script src=\u0026#34;//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/highlight.min.js\u0026#34;\u0026gt;\u0026lt;/script\u0026gt; \u0026lt;script\u0026gt;hljs.initHighlightingOnLoad();\u0026lt;/script\u0026gt; And you can replace railscasts.min.css with another style available on the highlightjs website. Currently I\u0026rsquo;m using gist-github style.\nTo use highlightjs in your article, just add :\n\u0026lt;pre\u0026gt;\u0026lt;code\u0026gt; Your code \u0026lt;/code\u0026gt;\u0026lt;/pre\u0026gt; So let\u0026rsquo;s add some code to our articles !\n","date":"2016-08-05T04:50:00Z","image":"/images/2016/10/hihglistgs.png","permalink":"/make-code-beautiful-wordpress-2/","title":"How to make your code more beautiful on WordPress"},{"content":"You don't know what is Cloudflare ? So let's see how cloudflare make your website loading faster, and why you should already use it for all your websites.\n) Cloudflare DNS - Free \u0026amp; Fast Cloudflare provide at first one of the best DNS hosting service available. And to make a website faster you can already start with using a fast DNS hosting.\nDNS Provider Speed Comparison by solvedns.com\n![\u0001/images/2016/10/draw.jpg) It's only few Milliseconds but as you can see, Cloudflare is faster than many other providers and most of them offer paid services only. So before paying few dollars for a Premium DNS package, you should try cloudflare. Another feature you will love, is a propagation time around 5 minutes when you edit a record on your DNS. So if you need to migrate your website soon, this is really a good reason to register now.\n2. ) Cloudflare - Reverse Proxy with caching But cloudflare does not provide only DNS Hosting. It's also a complete solution to speed up and secure your website. For that when Cloudflare manage your DNS if you activate the optimization and security (orange cloud), instead of sending your server IP when a visitor make a DNS request, it will act as a proxy and all your visitors will view only the Cloudflare servers IP when they do a request.\n![\u0001/images/2016/10/overview.png) And Cloudflare will not only act as a simple proxy, it will also cache all the static files and deliver them all around the World to your visitors from the nearest Cloudflare datacenter.\nThe result is awesome because it will make your website faster as it will handle less requests, and it will also save a lot of bandwidth by limiting the number of file requests.\nAs you can see, with 80 000 visitors per month, it's more than 20GB of bandwidth saved and also more than 20GB of static assets which have been delivered faster.\n3) Cloudflare - Website Protection By acting as a proxy Cloudflare also provide a complete security solution which include :\nBrowser integrity check : Each visitor request is checked using the HTTP header and if a thread is found it can be challenged using a captcha or blocked. Visitor reputation : Cloudflare analyze daily thousands of IP, and if a visitor try several times to perform any form of hack, it will be marked as a potential thread for Cloudflare Page rules : You can use the page rules to allow or disallow access to a part of your website. For example with wordpress your can use a high level of secuirty onthe page http://yourdomain.com/wp-login.php to protect your website. DDoS protection : As your visitors have to use cloudflare servers to get access to your website, they will never have access to your server IP and any attack attempt will simply be blocked by the Cloudflare servers. But to protect totally your server, you have to be sure there is not any records which point directly to your server. The most common error will be to have a email server with a MX record pointing on your server IP. In this case, Cloudflare will not be able to protect your website because the attacker will send the traffic directly on your server IP, and will not have to use the Cloudflare proxy.\n4) Cloudflare - Website Optimization\nAnd if it wasn't enough, Cloudflare is also able to optimize your website. It can minify all your assets, including the html, reduce the number of connections, and with rocket loader it will make deliver your assets asynchronously. That mean instead of waiting for each file to be downloaded, with cloudflare your browser will download all the assets in the same time when you visit your website, and it will be up to 3x times faster.\nThe last optimization tool available for free is Rocket Loader, currently in beta, it's a script used by cloudflare to deliver your assets, without blocking the page display. It use the asynchronous loading to load your javascript at the end of the page display and this way it will really improve your pagespeed score. But like any beta, it could create error with some javascript or break your website design by loading too late some assets.\nFor this reason you have 2 mode to use Rocket loader :\nAutomatic : Rocket loader will optimize any javascript available on your website but you have the ability to forbid the optimization manually by adding data-cfasync=\"false\" before the script source. \u0026lt;script type=\u0026#34;text/javascript\u0026#34; data-cfasync=\u0026#34;false\u0026#34; src=\u0026#34;/js/tether.min.js\u0026#34;\u0026gt;\u0026lt;/script\u0026gt; Manual : This time you will have to add data-cfasync=\u0026ldquo;true\u0026rdquo; for each script you want to optimize with Rocket Loader\nI will complete this article with the HTTP2 and Cloudflare in the next few days.\n","date":"2016-08-01T18:57:00Z","image":"/images/2016/10/network-map.png","permalink":"/cloudflare-speed-protect-website/","title":"How Cloudflare speed up and protect your website - Part 1."},{"content":"A small post today to share with you a small tips to remove all the queries strings from WordPress static assets, and also to add featured images of your posts in the WordPress feeds.\nGo into your WordPress dashboard \u0026gt; Appearance \u0026gt; Editor Then find the file functions.php of your theme Add this code at the end of functions.php //remove queries from static assets function _remove_script_version( $src ){ $parts = explode( \u0026#39;?ver\u0026#39;, $src ); return $parts[0]; } add_filter( \u0026#39;script_loader_src\u0026#39;, \u0026#39;_remove_script_version\u0026#39;, 15, 1 ); add_filter( \u0026#39;style_loader_src\u0026#39;, \u0026#39;_remove_script_version\u0026#39;, 15, 1 ); // Include thumbnails is the RSS feed function rss_post_thumbnail($content) { global $post; if(has_post_thumbnail($post-\u0026gt;ID)) { $content = \u0026#39;\u0026lt;p\u0026gt;\u0026#39; . get_the_post_thumbnail($post-\u0026gt;ID) . \u0026#39;\u0026lt;/p\u0026gt;\u0026#39; . get_the_content(); } return $content; } add_filter(\u0026#39;the_excerpt_rss\u0026#39;, \u0026#39;rss_post_thumbnail\u0026#39;); add_filter(\u0026#39;the_content_feed\u0026#39;, \u0026#39;rss_post_thumbnail\u0026#39;); You can now try with GTMetrix.com if you have succefully remove the query strings. For the feed, you can test it with any RSS feed reader. Your WordPress feed are normally available at http://yourdomain.com/feed/.\n","date":"2016-06-30T00:45:00Z","image":"/images/2016/10/Screenshot_17.png","permalink":"/make-code-beautiful-wordpress/","title":"Remove Query strings and add featured images in WordPress feeds"},{"content":"When you want to buy a VPS, most of them use SSD, because a SSD have a better capacity for reading/writing than a Hard Drive and it also have a response time up to 40x faster than HDD.\nBut there are some small configuration to edit to get the best performances with your SSD as linux systems are not totally optimized for them.\nSo we will see how to speed up your VPS and how to configure debian/ubuntu to use a SSD properly. For a new install of a server the rules are :\nUse a recent linux system : Kernel 3.60+ Keep some free space on a disk (5-15%) Use ext4 in /etc/fstab add the noatime setting # / was on /dev/sda1 during installation UUID=33XXX-XXXX / ext4 noatime,errors=remount-ro 0 1 Limit the swap usage : If you use :\ncat /proc/sys/vm/swappiness The system should answer 60. So you just have to add the line below in /etc/sysctl.conf\nvm.swappiness=1 Then reboot your system. And it's done your VPS should already be faster\n","date":"2016-06-28T00:41:00Z","image":"/images/2016/10/Best-Performance-with-Linux---SSD.jpg","permalink":"/get-best-performance-ssd-linux-server/","title":"Linux \u0026 SSD : How to speed up your VPS"},{"content":"You have buy a VPS to speed up WordPress, but you are using a control panel and it's not faster than before ? In this tutorial, you will learn how to setup a Blazing fast WordPress with Nginx php7 and redis cache.\nThis will require to use the the command linux via SSH. Yes I know, it's less user friendly than a control panel. But it will not require any resources after the install and we have an amazing tools to help us : EasyEngine\nSo, first we will talk about what we are going to install and why it will make WordPress faster.\nNginx : To pronounce \"Engine X\", it's the web server created in 2002, created to handle high traffic with a low memory footprint. And this is the reason which explain why Nginx is so popular at the moment. It can also be used as a reverse proxy or as a load-balancer, which means if you have few small VPS, you will be able to create a stable and reliable platform to host your website.\nphp7 : I will not explain what is the php but more about the difference between the 5.6 and the 7. It's the performance and there is nothing better than a small graphic to compare them. And WordPress is fully compatible with the latest version of php.\nMariaDB : If you haven't already used it, MariaDB is a fork of Mysql from his creator, and it's an open-source solution which is currently faster than Mysql with a lower memory and processor footprint. So no need to hesitate, if you are still using msql, even in 5.7, it's time to move !\nRedis : What is Redis ? It's a remote dictionary server, which will manage your database and store the values in the memory. It's a \"NoSQL\" solution as Redis can be used as a database by writing data on your hard drive SSD. For WordPress there is no faster solution as it will eliminate the queries to your database, and even if you are using Mariadb, it will be faster and using less resources.\nBut you are maybe thinking it will be very hard to configure all that stuff properly. No, you will be able to do it in less than 10 minutes ! Because we are going to use EasyEngine, the most powerful tools to create an optimized WordPress website.\nIt's a command line tool to create install and configure a complete web server with Nginx, PHP, MariaDB and Postfix in a single command. It also provide you the ability to manage properly your virtualhosts with Nginx and make it easy with simple command to use.\nSo to start you need a VPS with Ubuntu 14.04. EasyEngine is also compatible with debian 7/8 and Ubuntu 16.04. But as EE has been build at first for ubuntu, it's the most stable solution.\nAt first we need to install EasyEngine.\nwget -qO ee rt.cx/ee \u0026amp;\u0026amp; sudo bash ee Done, EasyEngine is now ready to install what we need. So we are looking for WordPress with nginx, php7, redis and as it will not be harder, a SSL with let's encrypt. But you have the choice with EE :\nA simple website for html :\nee site create example.com --html A website with php :\nee site create example.com --php A website with mysql :\nee site create example.com --mysql A website with SSL by let's encrypt\nee site create example.com --letsencrypt And for WordPress ? You just have to choose :\nee site create example.com --wp # install wordpress without any page caching ee site create example.com --w3tc # install wordpress with w3-total-cache plugin ee site create example.com --wpsc # install wordpress with whisp-super-cache plugin ee site create example.com --wpfc # install wordpress + nginx fastcgi_cache ee site create example.com --wpredis # install wordpress + nginx redis_cache So for my example, I will use :\nee site create yourwebsite.com --wpredis --letsencrypt --php7 You will have to enter Yes to the EE questions, and yes your wordpress with redis php7 and SSL is already installed and configured. You also have two plugins in WordPress :\nNginx Helper to clear the cache Redis Cache : To connect WordPress with Redis and to clear the cache But you will maybe ask how you can connect to the database, what is the user of mysql and wordpress ? You can use a custom user during the install process by using\n--user=admin and -pass=password to set WordPress login details.\nBut you can also look at the install log to find them as EE display it in the console :\nnano /var/log/ee/install.log To see all the commands available with the websites :\nee site If you want to edit some default configuration (database, user etc) :\nnano /etc/ee/ee.conf By default EasyEngine create a backend access with all tools you can install with it (phpmyadmin, cache, php infos) at the address : http://yourserverIP:22222\nTo secure it properly just use :\nee secure --auth It will ask you for a user and a password. You can edit it at anytime.\nTo edit the default port :\nee secure --port And to get the mysql user of a website :\nee site info yoursite.com So I recommend you to change the port of admin tools, and to install what you need in the following :\nAdminer (phpmyadmin alternative )\nee stack install --adminer phpMyAdmin :\nee stack install --phpmyadmin phpAdminRedis (to manage data in cache) :\nee stack install --phpredisadmin All the Admin tools (Adminer, phpMyAdmin, phpMemcachedAdmin, FastCGI cleanup script, OPcache, Webgrind, Anemometer) :\nee stack install --admin You have to agree this tool is really awesome. And if you look to your memory usage using htop, you will see the difference with a control panel. Your website will be faster and you have the ability to edit your configuration or to add module when you want.\nSo to conclude this tutorial here the links you will need to understand perfectly EasyEngine and to use it for all your setup :\nThe File-System Layout The site create command All the tutorials Leave a comment if you have any question !\n","date":"2016-06-26T00:37:00Z","image":"/images/2016/10/How-to-setup-a-Blazing-Fast-VPS.png","permalink":"/blazing-fast-wordpress-nginx-php7-redis/","title":"Ubuntu - Blazing fast WordPress with Nginx php7 redis"},{"content":"Like anyone who want to manage easily multiple websites on a VPS or a dedicated server, i was looking for a control panel with good performance and ready for production. I have tested many control panels : (following panel are ranked by me and it's only my personal opinion)\nCentOS webpanel (free) : To young to be use in production, but many good features (varnish cache + nginx + Apache) and it will be always free. cPanel (paid) : The most powerful after plesk and cheap, but only compatible with Apache Serverpilot.io (free and paid) : First cloud control panel, the easiest to run a WordPress website on a VPS. Many awesome features with the paid level (10$ / month) like free ssl, http2, nginx reverse proxy etc.. For me you should try it and it will be one of the best panel in the next years. Ajenti (free) : Good panel with many features and a good compromise between interface configuration and text config. But i have no feeling with it. Webmin (free) : If the design don't hurt your eyes, it's a complete control panel with many features and with good documentation. And the last which is not a control panel yet because it have no GUI, easyengine.io, only for Power User at the moment but one of the lightest web server manager, and a good website with many tutorials.\nBut today i will make a small review of Plesk, the best control panel for me.\n1) What is Plesk ? Plesk is a full control panel, you can manage multiple website with a clean web interface, it's really secured and always update. There are 3 pricing plans depending on what you want : - Web Admin (10 domains) : to run some website on a VPS it's perfect - Web Pro (30 domains) : including the WordPress toolkit, it's the best ratio quality/price - Web Host (no limit) : If you want to run your own web hosting services\n2) But why should I choose Plesk as control panel ? Because you can test it for free during 15 days ? No, it's not the only reason. I recommend to try (to use) Plesk because it's a control panel for any webmaster. There is 3 views available, from the beginner view with simple configuration (domain, database, ftp) to the power user view with full access to advanced features like nginx config, PHP config, firewall etc You can use Plesk with or without web hosting knowledge, and you will find a documentation for you at Plesk's website.\nAs you are waiting for features :\nFor Beginner : - Website builder (you haven't to code) - Many Apps you can install in a single click : Wordpress (with themes, plugins and update management), Prestashop, PhpBB, MyBB, Drupal, Joomla - Security : SSL in 2 clicks with let's encrypt, backup to ftp or dropbox, webmail - Softaculous available (59 ready to install apps)\nFor Power User (yes i know you are waiting for real features and it's for them i love Plesk) :\nPerformance : - Nginx reverse proxy with caching (disk or memcache) - Apache 2.4 with HTTP2 - Multiple PHP version from 5.4 to 7.0 and PHP-FPM (so easy to use ) - Many PHP extension : GD, ioncube, opcache, - Last MariaDB release - Litespeed web server (i haven't test it yet) - JXCore and NodeJS (if you want trending techno) - Java, ruby, python, .Net support - DNS management - Docker (only in Plesk Onyx, in beta currently)\nSecurity : - Monitoring, logs, backup with increment - mod_security, firewall and fail2ban - SSL - Google authentication - Cloudflare integration - Antispam - Antivirus - file scanner - ddos protection\nAnd if you want to (or already have) run your own web hosting company, Plesk is available as VMware or KVM image, with Cloudlinux (Linux distribution for hosting company)\nI don't think i need to tell you more about Plesk features, but it's for them I use plesk in production. The most important for me is the security, and with fail2ban, a firewall, free ssl management and cloudflare integration,I'm sure to avoid most dangers. And the feature which decide me to choose Plesk is the Nginx Reverse proxy to handle all static files faster and with less res sources usage. But I'm maybe trying too much to sell you Plesk, so like it's a user review, I will also talk about the negative aspects of Plesk :\n- There is a good documentation online, but if you have never use nginx before -\u0026gt; start learning how nginx work now because the Plesk documentation explain how it's work but there is not any how to .. I have lost many hours to understand nginx and how to configure it correctly with Plesk - There is no free version : if you can try it during 14 days, you have to pay after. And I recommend you to buy it from your hosting company if you can, it will be cheaper than the Plesk Store. Prices (for VPS) : 5$ for the Web Admin, 15$ for the Web Pro, 25$ for the Web Host But you can have nice discounts with your hosting company, and sometimes it will be free with a dedicated server. Currently I pay 9$ a month for the Web Pro. - There are many apps and extensions available but some of them are not free. - It can be frustrating sometimes (often ^^) to use a full control panel like Plesk, because you are not free to add modules to nginx, to install something not included in Plesk. It's a very powerful tools if you accept to use only included tools. Don't think about adding Pagespeed modules, or to setup a custom version of Apache. With the version 17, you can customize your PHP modules but not more.\nThere are good and bad aspects with Plesk, like any control panel but I recommend it to any beginner who want to start using a VPS and to manage himself. And I recommend it too, to Power Users because if you can't customize all components, you will have a stable and powerful web server with features normally reserved to \"trending control panels in beta\". So now it's time to add a referral link and to earn some money But i'm not a Plesk Partner yet ...\nQuick summary of my review : Control panel to try : Serverpilot.io ( everybody should try it ) Plesk ( Read again from the beginning if you don't know why ..)\nFAQ : Can I use Plesk if i'm a beginner ? Yes but you need to buy a VPS or a dedicated.\nCan I try it for free ? yes you only have to register with a valid email.\nHow can i install it ? First Go to Plesk Website to read server requirement. On any recent linux OS :\n## Plesk 12.5 auto-installer sh \u0026lt;(curl http://autoinstall.plesk.com/one-click-installer || wget -O - http://autoinstall.plesk.com/one-click-installer) ## Plesk Onyx auto-installer sh \u0026lt;(curl http://autoinstall.plesk.com/one-click-installer || wget -O - http://autoinstall.plesk.com/one-click-installer) --tier testing ## Run Plesk 12.5 with Docker docker run --privileged -d -it -p 80:80 -p 443:443 -p 8880:8880 -p 8443:8443 -p 8447:8447 plesk/plesk ## Run Plesk Onyx with Docker docker run -d -it -p 80:80 -p 443:443 -p 8880:8880 -p 8443:8443 -p 8447:8447 plesk/plesk:preview What OS should I choose for Plesk ? Debian 8 64Bits\nCan I install Plesk on a small VPS ? Yes, for testing i run it on a 3$ VPS with only 2GB RAM. But for production 4GB is a minimum if you use the mail server or the DNS server.\nI need some help with Plesk ! Read the doc, browse Plesk knowledge base, and PM me if you don't find what you need.\nPlesk is too expensive for me ! Buy it from your web hosting company to get nice discounts. With OVH -\u0026gt; Web Admin Plan cost 2$ a month on VPS\nAre you working for Plesk ? No, i have only lost too much time to setup web servers and to try many control panels before trying Plesk.\nI use another Panel currently, can i migrate to Plesk ? Yes, it's a paid solution, they always have many tools to help you to buy a license ^^\nFeel free to ask anything about Plesk here. I'm also open to all suggestions or opinions.\nThis review is my personal opinion about control panels. Plesk is maybe not the best control panel for you, and there are many alternative to Plesk. ","date":"2016-05-20T15:08:00Z","image":"/images/2016/10/pleskonyx.png","permalink":"/plesk-web-server-control-panel/","title":"[Review] Plesk - A powerful web server control panel"}]