<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Wajed Afaneh on Medium]]></title>
        <description><![CDATA[Stories by Wajed Afaneh on Medium]]></description>
        <link>https://medium.com/@WajedAfaneh?source=rss-35c06d028416------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*_1idVBovQVepPlrjkQERdg.jpeg</url>
            <title>Stories by Wajed Afaneh on Medium</title>
            <link>https://medium.com/@WajedAfaneh?source=rss-35c06d028416------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 01:25:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@WajedAfaneh/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to install PHP 7.2.x, NGINX 1.10.x & Laravel 5.x]]></title>
            <link>https://medium.com/@WajedAfaneh/how-to-install-php-7-2-x-nginx-1-10-x-laravel-5-x-dab1fc1c415c?source=rss-35c06d028416------2</link>
            <guid isPermaLink="false">https://medium.com/p/dab1fc1c415c</guid>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Wajed Afaneh]]></dc:creator>
            <pubDate>Sun, 21 Jul 2019 09:05:56 GMT</pubDate>
            <atom:updated>2019-07-21T09:09:06.724Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jl5MbGYpH2HlWruZn0MbPA.jpeg" /><figcaption>Sample Laravel Application</figcaption></figure><h3>The following steps were written and execued on Ubuntu 16.04.3</h3><p>One you login your server using SSH, go to the root terminal copy/paste the commands below to get everything configured.</p><h4>Installation</h4><pre>sudo add-apt-repository ppa:ondrej/php<br>    sudo apt-get install software-properties-common<br>    sudo apt-get install python-software-properties<br>    sudo apt-get update<br>    sudo apt-get -y install unzip zip nginx php7.2 php7.2-mysql php7.2-fpm php7.2-mbstring php7.2-xml php7.2-curl</pre><p>Now check your server public DNS, it should display the nginx default web page.</p><h4>Configure NGINX</h4><p>In sites-enabled update the default file to:</p><p>1- Redirect all to https with www:</p><pre>server {<br>        listen 80 default_server;<br>        listen [::]:80 default_server;<br>        server_name _;</pre><pre>        # max upload size<br>        client_max_body_size 75M;   # adjust to taste</pre><pre>        root /var/www/html/public;<br>        index index.php index.html index.htm index.nginx-debian.html;</pre><pre>        location / {<br>                try_files $uri $uri/ /index.php?$query_string;<br>        }</pre><pre>        location ~ \.php$ {<br>                try_files $uri =404;<br>                fastcgi_split_path_info ^(.+\.php)(/.+)$;<br>                fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;<br>                fastcgi_index index.php;<br>                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>                include fastcgi_params;<br>        }<br>}</pre><pre>server {<br>        listen 80 default_server;<br>        listen [::]:80 default_server;<br>        server_name example.com www.example.com;<br>        return 301 https://www.example.com$request_uri;<br>}</pre><pre>server {<br>        listen 443 ssl;<br>        listen [::]:443 ssl;<br>        server_name example.ps;</pre><pre>        charset     utf-8;</pre><pre>        ssl on;<br>        ssl_certificate /etc/nginx/ssl/ssl-bundle.crt;<br>        ssl_certificate_key /etc/nginx/ssl/www_example_com.key;<br>        ssl_session_timeout 1d;<br>        ssl_session_cache shared:SSL:20m;<br>        ssl_session_tickets off;<br>        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;<br>        ssl_prefer_server_ciphers on;</pre><pre>        return 301 https://www.example.com$request_uri;<br>}</pre><pre>server {<br>        listen 443 ssl;<br>        listen [::]:443 ssl;<br>        server_name www.example.com;</pre><pre>        charset     utf-8;</pre><pre>        ssl on;</pre><pre>        ssl_certificate /etc/nginx/ssl/ssl-bundle.crt;<br>        ssl_certificate_key /etc/nginx/ssl/www_example_com.key;</pre><pre>        ssl_session_timeout 1d;<br>        ssl_session_cache shared:SSL:20m;<br>        ssl_session_tickets off;</pre><pre>        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;<br>        ssl_prefer_server_ciphers on;</pre><pre>        # max upload size<br>        client_max_body_size 75M;   # adjust to taste</pre><pre>        root /var/www/html/public;<br>        index index.php index.html index.htm index.nginx-debian.html;</pre><pre>        location / {<br>                try_files $uri $uri/ /index.php?$query_string;<br>        }</pre><pre>        location ~ \.php$ {<br>                try_files $uri =404;<br>                fastcgi_split_path_info ^(.+\.php)(/.+)$;<br>                fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;<br>                fastcgi_index index.php;<br>                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>                include fastcgi_params;<br>        }<br>}</pre><p>Restart NGINX server</p><pre>sudo service nginx restart</pre><h4>Install MYSQL</h4><pre>sudo apt-get install mysql-server<br>mysql_secure_installation</pre><h4>Installing Composer &amp; Laravel</h4><pre>sudo usermod -a -G www-data ubuntu<br>sudo apt-get -y install composer<br>cd /var/www/html<br>sudo chown -R ubuntu:www-data /var/www/html<br>rm -f index.nginx-debian.html <br>composer create-project laravel/laravel . or clone repo<br>mv .env.example .env<br>php artisan key:generate<br>sudo chmod -R 775 /var/www/html/storage</pre><p>Update the .env file to connect to MYSQL database &amp; That’s it</p><h3>Bouns configure MYSQL Remote ACCESS</h3><p>Out of the box, MySQL will only allow access from the localhost address 127.0.0.1. To change this, you need to open the /etc/mysql/mysql.conf.d/mysqld.cnf file and change the line:</p><pre>bind-address = 127.0.0.1</pre><p>to:</p><pre>bind-address = 0.0.0.0</pre><p>Save and close that file. Restart the MySQL server with the command:</p><pre>sudo systemctl restart mysql.service</pre><p>Log in to the MySQL server. Log in to MySQL with the command mysql -u root -p Type the MySQL root user password. Issue the MySQL command:</p><pre>GRANT ALL PRIVILEGES ON *.* TO root@&#39;%&#39; IDENTIFIED BY &#39;password&#39;;</pre><p>Flush the MySQL privileges with the command</p><pre>FLUSH PRIVILEGES;</pre><p>Exit out of the MySQL prompt with the command</p><pre>exit;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dab1fc1c415c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>