Install Nginx/PHP-FPM on Fedora 28/27, CentOS/RHEL 7.5/6.10 - Comment Page: 1

This is guide howto install Nginx with PHP 7.2.10 and PHP-FPM on Fedora 28/27/26, CentOS 7.5/6.10 and Red Hat (RHEL) 7.5/6.10. PHP-FPM is easier to use and configure than FastCGI and some tests says that PHP-FPM is even much more efficient than FastCGI. Nginx (engine x) is a robust, small and high performance http server, reverse proxy server and also mail proxy server. PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites. 1. Install Nginx, PHP 7.2.10 and PHP-FPM on Fedora 28/27/26, CentOS 7.5/6.10, Red Hat (RHEL) 7.5/6.10 [inttf_post_ad1] 1.1 Change to root...

198 comments on “Install Nginx/PHP-FPM on Fedora 28/27, CentOS/RHEL 7.5/6.10 - Comment Page: 1

1 2 3 6
    1. Hey, thank you for this clean tutorial.

      Just one little thing, don’t know why but in order to install php-fpm I had to use

      yum --enablerepo=remi install php-fpm

      Reply
      • You are welcome! :)

        So you could not use following command?

        
        yum --enablerepo=remi install nginx php php-fpm php-common
        
        Reply
        • Ops, my bad.

          Reply
          • Okey! :)

            Nice to hear that you get it working! ;)

            Reply
    2. Thanks for your post. nginx fails to start after following the directions for fedora 16. this is what systemctl status says:

      Loaded: loaded (/etc/rc.d/init.d/nginx)
      Active: failed since Sat, 19 Nov 2011 09:02:52 -0700; 25s ago
      Process: 14752 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=1/FAILURE)
      CGroup: name=systemd:/system/nginx.service

      I am new to this, do you have any suggestions for what to do to make it work?
      Thanks

      Reply
      • Hi ebobo,

        Check your /var/log/messages log file:

        
        grep nginx /var/log/messages
        

        Do you see something like following:

        
        Nov 19 22:06:09 fedora nginx[17850]: Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
        Nov 19 22:06:10 fedora nginx[17850]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
        Nov 19 22:06:10 fedora nginx[17850]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
        Nov 19 22:06:11 fedora nginx[17850]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
        Nov 19 22:06:11 fedora nginx[17850]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
        Nov 19 22:06:12 fedora nginx[17850]: nginx: [emerg] still could not bind()
        Nov 19 22:06:12 fedora nginx[17850]: [FAILED]
        Nov 19 22:06:12 fedora systemd[1]: nginx.service: control process exited, code=exited status=1
        Nov 19 22:06:12 fedora systemd[1]: Unit nginx.service entered failed state.
        

        You maybe have httpd (apache) running and using port 80, stop it and try to start nginx again:

        
        systemctl stop httpd.service
        
        /etc/init.d/nginx start
        ## OR more fedora 16 way ##
        systemctl start nginx.service
        

        Then you can run following command to disable httpd (apache):

        
        systemctl disable httpd.service
        
        Reply
        • That was the problem, thanks you!

          Reply
    3. Hi JR, thanks for the great guide.

      In Step 5, should the Stop httpd (Apache) commands be ‘stop’ rather than ‘start’?

      /etc/init.d/httpd stop
      ## OR ##
      service httpd stop

      Reply
      • Thanks Ben, yes stop it should be…it’s fixed now! :)

        Reply
      • if you are using f16
        systemctl stop httpd.service

        Reply
        • Yes systemctl stop httpd.service is more Fedora 16 style, but also /etc/init.d/httpd stop and service httpd stop works, because it is actually redirected to systemctl.

          
          # service httpd stop
          Stopping httpd (via systemctl):                            [  OK  ]
          
          Reply
    4. […] wrote before a guide Howto install Nginx/PHP-FPM on Fedora 16/15, CentOS/RHEL 6.1/6/5.7, but this guide is just installation guide and many cases Nginx and PHP-FPM basic configuration is […]

      Reply
    5. Before doing these steps, I needed to run the following:

      yum -y update rpm

      To fix:
      error: Failed dependencies:
      rpmlib(FileDigests) <= 4.6.0-1 is needed by epel-release-6-5.noarch
      rpmlib(PayloadIsXz) <= 5.2-1 is needed by epel-release-6-5.noarch

      This allowed me to follow this tutorial.

      Reply
      • Hi Josh,

        Thanks for this note. I normally assume that every users run up-to-date systems… :)

        Reply
        • I too am getting this but did run yum update before starting the installations.

          error: Failed dependencies:
          rpmlib(FileDigests) <= 4.6.0-1 is needed by epel-release-6-5.noarch
          rpmlib(PayloadIsXz) <= 5.2-1 is needed by epel-release-6-5.noarch

          running CentOS release 5.8 32 bit

          Reply
        • Ignore that. RTFM.. I did but copied wrong line. DOH

          Reply
    6. Thanks for this tuts, I already set my server this way and all is just working, One problem persist is that after I install WordPress on it, when I try to add new themes on wp-content/themes/ directory manually, the themes doesn’t appears on the dashboard. And when I try to add it from upload menu, it doesn’t works either. Could you help me please :) Thanks a lot before.

      Reply
      • Hi Tiyo,

        Could you post following output from your wp-content/ and wp-content/themes/ directory:

        
        ls -la wp-content/
        
        ## AND ##
        
        ls -la wp-content/themes/
        
        ## AND ##
        
        grep -e "user =" -e "group =" /etc/php-fpm.d/[your_wordpress_conf].conf
        
        Reply
    7. Hi JR..
      In step 7, after run this command :
      cd /etc/nginx/sites-enabled/
      ln -s /etc/nginx/sites-available/testsite.local
      service nginx restart

      i got this error :
      [[email protected] etc]# /etc/init.d/nginx start
      Starting nginx (via systemctl): Job failed. See system logs and 'systemctl status' for details.
      [FAILED]

      here my log :
      [[email protected] etc]# grep nginx /var/log/messages
      Dec 12 15:22:01 glenn nginx[1130]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 12 15:22:01 glenn nginx[1130]: [FAILED]
      Dec 12 15:22:02 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 12 15:22:02 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 12 15:26:56 glenn nginx[1155]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 12 15:26:56 glenn nginx[1155]: [FAILED]
      Dec 12 15:26:56 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 12 15:26:56 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 12 15:35:40 glenn nginx[1129]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 12 15:35:40 glenn nginx[1129]: [FAILED]
      Dec 12 15:35:40 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 12 15:35:40 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 13 03:42:07 glenn nginx[1156]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 13 03:42:07 glenn nginx[1156]: [FAILED]
      Dec 13 03:42:07 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 13 03:42:07 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 13 03:45:39 glenn nginx[1130]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 13 03:45:39 glenn nginx[1130]: [FAILED]
      Dec 13 03:45:39 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 13 03:45:39 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 13 06:07:39 glenn nginx[1144]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 13 06:07:39 glenn nginx[1144]: [FAILED]
      Dec 13 06:07:39 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 13 06:07:39 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 13 06:13:51 glenn nginx[1205]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 13 06:13:51 glenn nginx[1205]: [FAILED]
      Dec 13 06:13:51 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 13 06:13:51 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 13 06:22:55 glenn nginx[1242]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 13 06:22:55 glenn nginx[1242]: [FAILED]
      Dec 13 06:22:55 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 13 06:22:55 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 15 02:36:45 glenn nginx[1149]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 15 02:36:45 glenn nginx[1149]: [FAILED]
      Dec 15 02:36:45 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 15 02:36:45 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 15 08:04:30 glenn nginx[1161]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 15 08:04:30 glenn nginx[1161]: [FAILED]
      Dec 15 08:04:30 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 15 08:04:30 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 15 08:48:58 glenn nginx[3408]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 15 08:48:58 glenn nginx[3408]: [FAILED]
      Dec 15 08:48:58 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 15 08:48:58 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 15 08:49:15 glenn nginx[3452]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 15 08:49:15 glenn nginx[3452]: [FAILED]
      Dec 15 08:49:15 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 15 08:49:15 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 15 08:50:16 glenn nginx[3485]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 15 08:50:16 glenn nginx[3485]: [FAILED]
      Dec 15 08:50:16 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 15 08:50:16 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 15 08:52:36 glenn nginx[3545]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 15 08:52:36 glenn nginx[3545]: [FAILED]
      Dec 15 08:52:36 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 15 08:52:36 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 15 08:54:19 glenn nginx[3588]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 15 08:54:19 glenn nginx[3588]: [FAILED]
      Dec 15 08:54:19 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 15 08:54:19 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 15 08:54:34 glenn nginx[3605]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 15 08:54:34 glenn nginx[3605]: [FAILED]
      Dec 15 08:54:34 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 15 08:54:34 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 15 08:54:43 glenn nginx[3623]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 15 08:54:43 glenn nginx[3623]: [FAILED]
      Dec 15 08:54:43 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 15 08:54:43 glenn systemd[1]: Unit nginx.service entered failed state.
      Dec 15 08:54:56 glenn nginx[3644]: Starting nginx: nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:1
      Dec 15 08:54:56 glenn nginx[3644]: [FAILED]
      Dec 15 08:54:56 glenn systemd[1]: nginx.service: control process exited, code=exited status=1
      Dec 15 08:54:56 glenn systemd[1]: Unit nginx.service entered failed state.

      So, how to solve it?
      Thx b4.. :)

      Reply
      • Hi glenn,

        Could you post content of your /etc/nginx/nginx.conf file?

        Reply
        • Here :
          location ~ \.php$ {
          root html;
          fastcgi_pass 127.0.0.1:9000;
          fastcgi_index index.php;
          fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
          include fastcgi_params;
          }
          include /etc/nginx/conf.d/*.conf
          include /etc/nginx/sites-enabled/*;

          Reply
          • Your /ect/nginx/nginx.conf config should example look like following:

            
            user              nginx;
            worker_processes  1;
            error_log  /var/log/nginx/error.log;
            pid        /var/run/nginx.pid;
            
            events {
                worker_connections  1024;
            }
            
            http {
                include       /etc/nginx/mime.types;
                default_type  application/octet-stream;
            
                log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                                  '$status $body_bytes_sent "$http_referer" '
                                  '"$http_user_agent" "$http_x_forwarded_for"';
            
                access_log  /var/log/nginx/access.log  main;
                sendfile        on;
                keepalive_timeout  65;
            
                include /etc/nginx/conf.d/*.conf;
            
                include /etc/nginx/sites-enabled/*;
            }
            

            This is Fedora’s Nginx package example nginx.conf, without comment lines and include /etc/nginx/sites-enabled/*; added.

            Location block(s) should be always inside server block(s) and server block(s) should be always inside http block.

            Reply
    8. Thanks for the help, and sorry for my long respond :)
      the first two commands, show that themes that I add recently is owned by root, so the problem is only on the permission?
      I new to this I’m not sure what to do, but I will try to use chmod if it is working.

      Reply
      • Hi again Tiyo,

        Yes, your problem is directory permissions, and you can fix those with chmod command, but much better way is to use chown command and change your directories and files owner:group to same that PHP-FPM is using.

        More info about Nginx and PHP-FPM configuration you can find from Nginx and PHP-FPM Configuration and Optimizing Tips and Tricks

        Reply
    9. Hi,

      Everything went well except that I can’t see the webpages (e.g. testsite.local) across the network. I’m running my web server from a virtual machine, if this would matter. Furthermore, I checked the logs and it doesn’t contain any error or access messages.

      Cheers

      Reply
      • Hi Bar,

        Could you post output of following command from you host (where you try to load pages):

        
        cat /etc/hosts
        

        And output of following commands from your virtual machine:

        
        ifconfig
        
        iptables -L
        
        Reply
        • cat /etc/hosts

          127.0.0.1 localhost localhost.localdomain testsite.local localhost4 localhost4.localdomain4
          ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

          ifconfig

          eth2 Link encap:Ethernet HWaddr 46:50:06:A0:A6:1A
          inet addr:172.16.9.17 Bcast:172.16.9.255 Mask:255.255.255.0
          inet6 addr: fe80::4450:6ff:fea0:a61a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:141237 errors:0 dropped:0 overruns:0 frame:0
          TX packets:70011 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:164894974 (157.2 MiB) TX bytes:4603652 (4.3 MiB)
          Interrupt:16

          lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

          iptables -L

          Chain INPUT (policy ACCEPT)
          target prot opt source destination
          ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
          ACCEPT icmp -- anywhere anywhere
          ACCEPT all -- anywhere anywhere
          ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
          REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
          ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http

          Chain FORWARD (policy ACCEPT)
          target prot opt source destination
          REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

          Chain OUTPUT (policy ACCEPT)
          target prot opt source destination

          Reply
          • Hi Bar,

            Looks almost right, your testsite.local on your /etc/hosts should point to your virtual machine ip, so remove testsite.local from first line and add following line:

            172.16.9.17 testsite.local

            Or what ever your virtual server ip is…if you reboot your virtual machine and if you use dhcp, then it might be something else than 172.16.9.17.

            Reply
      • I am having the same issue, and it appears to be with the IPTABLES configuration. I can open the page on the localhost using links ([[email protected] ~]$ links http://testsite.local) WITHOUT changing permissions, owners, etc. All steps in the tutorial were followed exactly.

        Also, the MySQL server is suffering the same problem. It is completely inaccessible from outside the localhost. I have to establish an SSH tunnel to the server to use MySQL Workbench.

        I’m using CentOS 6.2 in VirtualBox.

        [[email protected] ~]# iptables -L
        Chain INPUT (policy ACCEPT)
        target prot opt source destination
        ACCEPT all — anywhere anywhere state RELATED,ESTABLISHED
        ACCEPT icmp — anywhere anywhere
        ACCEPT all — anywhere anywhere
        ACCEPT tcp — anywhere anywhere state NEW tcp dpt:ssh
        REJECT all — anywhere anywhere reject-with icmp-host-prohibited
        ACCEPT tcp — anywhere anywhere state NEW tcp dpt:mysql
        ACCEPT tcp — anywhere anywhere state NEW tcp dpt:http

        Chain FORWARD (policy ACCEPT)
        target prot opt source destination
        REJECT all — anywhere anywhere reject-with icmp-host-prohibited

        Chain OUTPUT (policy ACCEPT)
        target prot opt source destination

        Reply
        • This works:

          [[email protected] ~]# cat /etc/sysconfig/iptables
          # Firewall configuration written by system-config-firewall
          # Manual customization of this file is not recommended.
          *filter
          :INPUT ACCEPT [0:0]
          :FORWARD ACCEPT [0:0]
          :OUTPUT ACCEPT [0:0]
          -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT
          -A INPUT -p icmp -j ACCEPT
          -A INPUT -i lo -j ACCEPT
          -A INPUT -m state –state NEW -m tcp -p tcp –dport 22 -j ACCEPT
          -A INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT
          -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
          -A INPUT -j REJECT –reject-with icmp-host-prohibited
          -A FORWARD -j REJECT –reject-with icmp-host-prohibited
          COMMIT

          Reply
    10. i have same problem with Bar.

      The /etc/host file’s content is only this
      127.0.0.1 testsite.local

      but i run this code as root > cat /etc/hosts ## seems that
      127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
      ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

      i restart pc but it dont change. it is equal.

      Thanks RJ…

      Reply
    11. i use Fedora 16, i run as root but this code don’t work
      chown -R nginx:nginx /srv/www/testsite.local

      it’s works. i apply this
      chmod -R 777 /srv/www/testsite.local

      Reply
    12. Hi Sargin,

      /etc/host file should not even exist, it should be /etc/hosts. So add your

      127.0.0.1 testsite.local

      to /etc/hosts file!

      Could you tell more specific what is the problem with chown -R nginx:nginx /srv/www/testsite.local command?

      Btw. Good to remember that chmod 777 is very dangerous on public servers…everybody can read, write and execute everything…so never use it, in real life.

      Reply
    13. domain name is sargin.domain i add sargin.domain to /etc/hosts

      at /etc/nginx/sites-available exist sargin.domain

      sargin.domain file content below:
      server {
      server_name sargin.domain;
      access_log /home/asus/NetBeansProjects/logs/access.log;
      error_log /home/asus/NetBeansProjects/logs/error.log;
      root /home/asus/NetBeansProjects;

      location / {
      index index.html index.htm index.php;
      }

      location ~ \.php$ {
      include /etc/nginx/fastcgi_params;
      fastcgi_pass 127.0.0.1:9000;
      fastcgi_index index.php;
      fastcgi_param SCRIPT_FILENAME /home/asus/NetBeansProjects$fastcgi_script_name;
      }
      }

      /etc/nginx/sited-enabled/ exist sargin.domain link

      when i go sargin.domain

      403 forbidden :(

      how can i solve__?

      Reply
      • Hi sargin,

        Did you remember restart your Nginx server?

        
        /etc/init.d/nginx restart
        
        Reply
        • yes i tried uubss but dont change. sargin.domain 403 Forbidden

          —-
          i make a sample different source
          /srv/www/sargin.host
          i add sargin.host to /etc/hosts.
          it works now.

          is home folders special folder so it give 403 forbidden message????

          Reply
          • Do you have right permissions on your home folder?

            Please post output of following commands:

            
            ls -la /home/asus/
            ls -la /home/asus/NetBeansProjects
            ls -la /srv/www/
            
            Reply
            • [[email protected] asus]# ls -la /home/asus/
              ls: /home/asus/.gvfs’e eriÅŸilemedi: EriÅŸim engellendi
              toplam 196
              drwx——. 30 asus asus 4096 Ara 21 13:32 .
              drwxr-xr-x. 3 root root 4096 Ara 20 22:30 ..
              drwxrwxr-x. 2 asus asus 4096 Ara 20 22:31 .abrt
              -rw——-. 1 asus asus 112 Ara 21 13:17 .bash_history
              -rw-r–r–. 1 asus asus 18 Haz 22 17:38 .bash_logout
              -rw-r–r–. 1 asus asus 193 Haz 22 17:38 .bash_profile
              -rw-r–r–. 1 asus asus 124 Haz 22 17:38 .bashrc
              drwxr-xr-x. 2 asus asus 4096 Ara 20 22:31 Belgeler
              drwx——. 10 asus asus 4096 Ara 21 05:56 .cache
              drwx——. 14 asus asus 4096 Ara 21 13:36 .config
              drwx——. 3 asus asus 4096 Ara 20 22:31 .dbus
              -rw——-. 1 asus asus 16 Ara 20 22:31 .esd_auth
              drwxr-xr-x. 2 asus asus 4096 Ara 21 03:02 .fontconfig
              drwx——. 4 asus asus 4096 Ara 21 13:38 .gconf
              drwxr-xr-x. 2 asus asus 4096 Ara 20 22:31 Genel
              drwx——. 4 asus asus 4096 Ara 20 22:36 .gnome2
              -rw-r–r–. 1 asus asus 3072 Ara 21 06:28 .grl-bookmarks
              -rw-r–r–. 1 asus asus 2048 Ara 21 06:28 .grl-metadata-store
              -rw-r–r–. 1 asus asus 4096 Ara 21 06:28 .grl-podcasts
              drwxrwxr-x. 2 asus asus 4096 Ara 21 03:15 .gstreamer-0.10
              -rw-rw-r– 1 asus asus 146 Ara 21 07:57 .gtk-bookmarks
              d?????????? ? ? ? ? ? .gvfs
              -rw——-. 1 asus asus 2170 Ara 21 07:57 .ICEauthority
              -rw-r–r– 1 asus asus 3120 Ara 21 07:57 .imsettings.log
              drwxr-xr-x. 2 asus asus 4096 Ara 21 08:11 Ä°ndirilenler
              drwxr-xr-x. 3 asus asus 4096 Ara 20 22:31 .local
              drwxr-xr-x. 2 asus asus 4096 Ara 20 22:31 Masaüstü
              drwx——. 3 asus asus 4096 Ara 20 22:31 .mission-control
              drwxr-xr-x. 5 asus asus 4096 Ara 20 22:31 .mozilla
              drwxr-xr-x. 2 asus asus 4096 Ara 20 22:31 Müzik
              drwxrwxr-x 3 asus asus 4096 Ara 21 08:24 .netbeans
              drwxrwxr-x 3 asus asus 4096 Ara 21 09:06 .netbeans-derby
              drwxrwxr-x 4 nginx nginx 4096 Ara 21 11:31 NetBeansProjects
              drwxrwxr-x. 3 asus asus 4096 Ara 21 03:02 .openoffice.org
              drwx——. 2 asus asus 4096 Ara 20 22:31 .pulse
              -rw——-. 1 asus asus 256 Ara 20 22:31 .pulse-cookie
              drwxr-xr-x. 2 asus asus 4096 Ara 21 13:13 Resimler
              drwxrwxr-x 2 asus asus 4096 Ara 21 13:17 .shotwell
              drwxr-xr-x. 2 asus asus 4096 Ara 20 22:31 Åžablonlar
              drwx——. 5 asus asus 4096 Ara 21 09:06 .thumbnails
              drwxr-xr-x. 2 asus asus 4096 Ara 20 22:31 Videolar
              drwxrwxr-x 4 asus asus 4096 Ara 21 12:58 www
              -rw——-. 1 asus asus 24083 Ara 21 13:44 .xsession-errors
              -rw-r–r–. 1 asus asus 658 Åžub 8 2011 .zshrc
              **********************************************

              [[email protected] asus]# ls -la /home/asus/NetBeansProjects
              toplam 24
              drwxrwxr-x 4 nginx nginx 4096 Ara 21 11:31 .
              drwx——. 30 asus asus 4096 Ara 21 13:32 ..
              -rw-rw-r– 1 nginx nginx 10 Ara 21 11:31 index.php
              -rw-rw-r– 1 nginx nginx 11 Ara 21 11:23 index.php~
              drwxrwxr-x 2 nginx nginx 4096 Ara 21 09:15 logs
              drwxrwxr-x 3 nginx nginx 4096 Ara 21 09:51 PhpProject1
              ***************************************************

              [[email protected] asus]# ls -la /srv/www/
              toplam 16
              drwxr-xr-x 4 root root 4096 Ara 21 12:35 .
              drwxr-xr-x. 3 root root 4096 Ara 21 08:45 ..
              drwxr-xr-x 4 nginx nginx 4096 Ara 21 12:35 sargin.domain
              drwxrwxrwx 4 nginx nginx 4096 Ara 21 08:45 testsite.local

              Reply
              • Thanks and sorry, but could you also post also following outputs:

                
                ls -la /
                ls -la /home
                
                Reply
                • [[email protected] asus]# ls -la /
                  toplam 188
                  dr-xr-xr-x. 21 root root 4096 Ara 21 07:57 .
                  dr-xr-xr-x. 21 root root 4096 Ara 21 07:57 ..
                  -rw-r–r– 1 root root 0 Ara 21 07:57 .autorelabel
                  dr-xr-xr-x. 2 root root 4096 Ara 21 03:48 bin
                  dr-xr-xr-x. 4 root root 4096 Ara 21 00:28 boot
                  drwxr-xr-x 21 root root 3800 Ara 21 13:41 dev
                  drwxr-xr-x. 132 root root 12288 Ara 21 13:42 etc
                  drwxr-xr-x. 3 root root 4096 Ara 20 22:30 home
                  dr-xr-xr-x. 20 root root 12288 Ara 21 03:48 lib
                  drwx——. 2 root root 16384 Ara 21 00:04 lost+found
                  drwxr-xr-x 7 root root 140 Ara 21 13:32 media
                  drwxr-xr-x. 2 root root 4096 Tem 29 11:49 mnt
                  drwxr-xr-x. 4 root root 4096 Ara 21 06:11 opt
                  dr-xr-xr-x 185 root root 0 Ara 21 09:57 proc
                  -rw-r–r– 1 root root 86132 Ara 21 07:57 .readahead
                  dr-xr-x—. 9 root root 4096 Ara 21 14:33 root
                  drwxr-xr-x 35 root root 1220 Ara 21 13:42 run
                  dr-xr-xr-x. 2 root root 12288 Ara 21 03:48 sbin
                  drwxr-xr-x. 3 root root 4096 Ara 21 08:45 srv
                  drwxr-xr-x 13 root root 0 Ara 21 09:57 sys
                  drwxrwxrwt. 23 root root 4096 Ara 21 14:22 tmp
                  drwxr-xr-x. 13 root root 4096 Ara 20 22:59 usr
                  drwxr-xr-x. 18 root root 4096 Ara 21 00:26 var
                  ********************************************************

                  [[email protected] asus]# ls -la /home
                  toplam 12
                  drwxr-xr-x. 3 root root 4096 Ara 20 22:30 .
                  dr-xr-xr-x. 21 root root 4096 Ara 21 07:57 ..
                  drwx——. 30 asus asus 4096 Ara 21 13:32 asus

                  thanks for answer RJ..

                  Reply
                  • Thanks! :)

                    Try following (as root):

                    
                    chmod 711 /home/asus
                    
                    /etc/init.d/nginx restart
                    

                    Is it working then?

                    Reply
    14. Nice tutorial, i am noob in linux, is my first time in istall lemp on fedora 16…and this work without problems!

      Very tks

      Reply
    15. Work like a charm, even for the first time (server name=blright.dev) it keep showing message that the root directory isn´t where it should be (/var/nginx/www). But after redo from step number 7 with new server name (kam.ty) all is well.

      Reply
1 2 3 6

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close