Installing the Nginx web server with PHP on Windows - video tutorial

Hi friends, today we will talk about installing Nginx web server with PHP on Windows, setup is becoming widely used on the web nowadays and not be bad to have Nginx with PHP on localhost.
What is Nginx?
Nginx is a web server and reverse proxy HTTP, POP, IMAP, etc., as web server it is much more powerful than the famous Apache.
What is a web server?
I think many of you know this, the web server allows us to view web pages in a browser (client), there would be no web server WWW (internet). When you click on a link in the browser, a server on the other side loaded content that you serverasca, a kind of digital waiter.
Like all things, and servers are of many kinds, Nginx server is a very light, it is loaded with too many modules, such as Apache. How it is thought this server makes it highly effective satisfied with less memory and what is more important, has a predictable behavior, Apache instead you can make a surprise when your baby's world. Apache's advantage is that it is the market's inception WWW while and has built a solid community has solid support in all control panels (hosting). Nginx does not have history behind Apache but rapidly gaining ground because of their undeniable.
Someone once said that Apache is like a Microsoft Office has a lot of options that uses only two or three, Nginx on the other hand is like Libre Office, has exactly what he needs and nothing more, of course there are modules with which you wide range of functions.
A big minus for Nginx is that there is little documentation (original in Russian), but hopefully things will change.
A big step forward for everyone should be that manufacturers control panels (Plesk, cPanel, etc.) to implement native support for alternative (Nginx, Lighttpd, etc.).
How to Install Nginx and PHP on Windows?
First need to download Nginx and PHP for Windows:
Download Nginx for Windows
Download the latest version of PHP

1. Nginx install, choose the installation path in the root partition C: \
2. Create a folder named "php" in the C: \ nginx \ folder
3. Extract the PHP zip files, all the files extract them in C: \ nginx \ php \
4. Now go to the C: \ nginx \ conf \ folder and here edit the nginx.conf file (use notepad or better notepad ++), delete the asterisks in front of "location" exactly as you saw in the tutorial, then replace with the code below and save the file.

location ~ .php $ {root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME c: / nginx / html / $ fastcgi_script_name; include fastcgi_params; }

5. Replace the contents of the file start-nginx.bat in C: \ nginx \ conf \ with the following code and save the file.

@ECHO OFF c: \ nginx \ nginx.exe c: \ nginx \ php \ php-cgi.exe -b 127.0.0.1:9000 -cc: \ nginx \ php \ php.ini ping 127.0.0.1 -n 1> NUL echo Starting nginx echo. echo. echo. ping 127.0.0.1> NO EXIT

6. Now we need to make a index.php file that we will put in C: \ nginx \ html \ in this file will put the code then save the game.

7. Run the start-nginx.bat
8. In the browser access "http: //localhost/index.php", if everything is ok, the php details should be displayed.
These settings are made locally, if you want to be seen from the internet and you have a router, you have to do a port forwarding for port 80 with the ip assigned by the router (in cmd put "ipconfig" to find the ip, after that simply put your address in the browser and you are on the net.
If it works on localhost and not go on the Internet means that you have not blocked well you port forwarding or firewall.

Remember, if you have suggestions, complaints or additions do not hesitate to write in the comments box, de-also if you met the comments box a user has a problem and you can help him, do not hesitate to do it, the only way we can do this place better, see the comments box!
On the comments box trying to get somewhat on the subject so other visitors can offer a tutorial + comments relevant comments may be extra support for user errors, or desire to learn.
Before asking a question try looking through the comments oldest, most times there already answered your question.
Use more categories at the top of the site and the search engine from the right corner to quickly get to what you are interested, we have over 700 tutorials that cover almost every genre of software, we have realized, I you just have to search for them and watch them.

Instructions for use videotutorial.ro

Search Engine.
If for example you have a problem with Yahoo Messenger, you can enter in our search engine terms like Yahoo, Mess, Messenger, id mess, multimess problem messenger, messenger error, etc., you will see that you will have a choice.

Categories.
If you use category drop-down, they find the bar under Home categories: Office, Graphic-Design, Hardware, Internet, Multimedia, Security, System, Storage, Backup, under these categories are organized sub-categories and sub-sub -categorii, that's a more accurate filtering. To find something related to Yahoo Messenger using the categories you can lead the category:InternetThere will open other subcategories where you choose Voice-ChatFrom there you can go on the subcategory YahooFinally, with these filters will arrive on a page where the only items related to Yahoo Messenger or Yahoo Mail.

Archives.
On the page Archives You can find all our tutorials organized beautiful days saptameni, months and years.
Everything is logical, just follow the logic.
Enjoy !
by Cristian Cismaru

 

Cristian Cismaru: I like everything related to IT&C, I like to share the experience and information I accumulate every day. I'm learning to teach you!

View Comments (61)

  • nam brother bathrooms understand anything of what you said in tutorial tutorial was more explicit

    • alex Sebis:
      nam brother bathrooms understand anything of what you said in tutorial tutorial was more explicit

      typical Romanian. ask (as you ask 'bath brother') the cristi-admin to come to your house to set it up and maybe serve you a beer. after they share us for free (mocha, in vain, etc.) from their knowledge we are still upset. it was hard to say 'I didn't understand this, please explain'. I don't know when we civilize?

  • alex Sebis:
    nam brother bathrooms understand anything of what you said in tutorial tutorial was more explicit

    If you do not understand anything means that you do not need Nginx with PHP on Windows. This tutorial is intended for those who want to install this setup, they did not try out this tutorial will be helpful.
    On this site there are plenty of tutorials, you will surely find something you like.

    • ASUS:
      And can make site to see him and the other PCs via localhost, what should I do?

      Localhost means the local resources, ie PC before whom you are, for others to access your server, they must enter the IP address bar of your browser, IP ol can find on google, write ip in the browser and access the first result.
      If you want an address like "domain.com", you have to buy it, if you are satisfied with a subdomain like "domain.domain.com" you can use noip or dyndns, we also have some tutorials.

      • Cristi-admin: Localhost means local resources, ie PC before whom you are, for others to access your server, they must enter the IP address bar of your browser, IP ol can find on google , write ip in the browser and access the first result.
        If you want an address like "domeniu.com" must buy it if you settle for a subdomain like "domeniu.domeniu.com" noip can call or DynDNS, we also have some tutorials.

        Aha Cristi but I besides PC and router I have two IP cameras that have different forwording port, and I tried and I appear inferfata D-Link router ip from the site, and access localhost ip go if stuffing I appear Dlink router with no-ip do not work at all times be in a router. As here there is something concrete to be a tutorial with everything you need and you can understand, one install xampp show how one mysql, etc.. but a tutorial that you can understand and learn to do this stuff with a PC and have the web server on it. I get stuck there do not know what to do when I appear dlink and not my site or 80 8080 port that you can not change the port as it comes stas 8080. If you do not thoroughly presented lite and I do not understand anything and shame of your tutorials. How do what are the steps, to understand?

        • ASUSAha Cristi but I besides PC and router IP I have two rooms that have different forwording port, and I tried and I inferfata arise from D-Link router ip from the site, and access localhost go if stuffing I appear Dlink router ip no-ip and not work at all times be made from a router. As here there is something concrete to be a tutorial with everything you need and you can understand, one install xampp show how one mysql, etc.. but a tutorial that you can understand and learn to do this stuff with a PC and have the web server on it. I get stuck there do not know what to do when I appear dlink and not my site or 80 8080 port that you can not change the port as it comes stas 8080. If you do not thoroughly presented lite and I do not understand anything and shame of your tutorials. How do what are the steps, to understand?

          First of all, you need to understand what portforwarding is and how to do it. We have a dedicated tutorial on this. Type up in the search box on the right on the black margin: Set trendnet router for port forwarding with virtual server and dmz, enter and you will find the tutorial. Watch the tutorial head-to-tail because I know you tend to do it on your own and read everything and read all the text above the tutorial. Until you understand what portforwarding means and does, you will not know when, how and why to apply it. Once you understand the principle of operation, it will be easy for you to do it on any router because most routers have this function .... it can be placed in a different location on each router but it exists.

          • AdrianGudus: First, you must understand what it is and how to do a portforwarding. About this we have a dedicated tutorial. Write up in the search box on the black edge of dreaptade: Set trendnet router for port forwarding with virtual server and DMZ, you enter and you will find the tutorial. Look head-tail tutorial because I know that you tend to do the Breazul and skilful in all and read and above all textl tutorial. Until you understand what it means and what a portforwarding, you will not know when, how and why to apply. Once you understand the principle of operation, it will be easy to do on any router as most routers have this feature .... can placed in a different location on each router but no.


            Yes, I did what I wanted to do yet but I see server pc nice site but on my PC I do not charge other than writing without image, only text appears. What where you have to walk to go flash player pc pc server via localhost so I see ok, but mine see only text, no flash.

          • ASUSYes, I did what I wanted to do yet but I see server pc nice site but on my PC I do not charge other than writing without image, only text appears. What where you have to walk to go flash player pc pc server via localhost so I see ok, but mine see only text, no flash.

            Often firewall or security suite you can scan and thus slow down traffic.
            Another cause could be wrong settings of the router (MTU).
            Disable firewall, antivirus, Windows Defender, etc..
            Set the correct router, to figure out if the router is trying to put on the net and try to access the server directly from a friend (teamviwer).

          • Cristi-admin: Often firewall or security suite you can scan and thus slow down traffic.
            Another cause could be wrong settings of the router (MTU).
            Disable firewall, antivirus, Windows Defender, etc..
            Set the correct router, to figure out if the router is trying to put on the net and try to access the server directly from a friend (teamviwer).

            Do not like what I saw from my PC when I type the address http://xxxxxx.no-ip.info appear but only text and gave myself one of those texts for example. Comment from wordpress theme and connect localhost serveraul say impossible, so like he looking at me servearul in your PC and from PC Server stopped all even Dlink router and firewall port DIR615 I did forwding to 192.168.0.103 and port 80 and go just not loading flash devices than text, and by xxxxxx.no-ip.info text appears only on pc and my server everything appears OK. Before I knew how to do but I have not done a long time ago and forgot.

  • I answer you asus.Cel little I know of to put on other pc have to put Ip you made or are no-ip and you put a name instead of IP

  • ASUS:
    And can make site to see him and the other PCs via localhost, what should I do?

    Looks like you have entered the first time on this site ASUS. Siugur you read the text above tutorial entirely? If not, do it well and do acezt.

    • Traian:
      A tutorial on installing ocs inventory or amanda backup possible?

      Traian:
      A tutorial on installing ocs inventory or amanda backup possible?

      Can I receive a response? Thanks

  • Cristi Adrian have a problem with sound win7 I tried what adrian said the automatic update and still will not install the drivers from the net .. and we give sound but after I have shut down any little sound ((( = I can do pls help!!

  • sall vas please make a tutorial about the new MeeGo operating system and if it only works on noteok or simple pc

  • Cristi, you note 10 +
    Everything went first (as all other matter)
    I understand that the site server know videotuorial.ro home to you?
    You are good!
    Spore to work and have lots and lots of power to work.

    • valentine:
      Cristi, you note 10 +
      Everything went first (as all other matter)
      I understand that the site server know videotuorial.ro home to you?
      You are good!
      Spore to work and have lots and lots of power to work.

      Valentine, you're not well :-)
      How to keep home server? What I data center under the couch?
      Such a server can not be kept at home, not because I have nowhere to put it, but I have not able to keep a server connection.
      Videotutorial.ro has 1Gbit connection internally and externally 50MB on, these are guaranteed for such a connection and 1000 home can pay per month, not counting the redundancy again to put even more 200 MB from another provider cost yourself a few more hundred dollars a month.
      Power supply is another problem, if my power goes what?
      For all these have made data centers.
      Who wants to keep their home server's problem is, we do not like, we need serious connections, reliability, uptime as good specialists around servers that can intervene in case of problems.
      Each of his job, we do tutorials, boys in data centers take care of our servers and network, as currently no tutorials to reach you quickly.

Related Post

This website uses cookies.