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

 


Related Tutorials


About Cristian Cismaru

I like everything related to IT&C, I like to share the experience and information I accumulate every day.
Learn as you learn!

Comments

  1. alex Sebis said

    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?

  2. 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.

  3. And can make site to see him and the other PCs via localhost, what should I do?

    • 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 "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.

      • 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?

        • AdrianGudus said

          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, 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.

          • 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.

  4. Paul Balan said

    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

  5. Paul Balan said

    Anyway I like the whole team site ul.Felicit

  6. AdrianGudus said

    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.

  7. A tutorial on installing ocs inventory or amanda backup possible?

    • 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

  8. george1984 said

    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!!

  9. Gheorghe said

    sall I would ask you to make a tutorial about the new MeeGo operating system and if you only go to and from your PC or simply noteok

  10. valentine said

    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, it's not good
      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.

  11. Saltu Cristi!
    said in the past as in the future you do a tutorial on how to make a tutorial. I think that future came. How about you show us what is happening behind the new "room"!

    • Ionel:
      Saltu Cristi!
      said in the past as in the future you do a tutorial on how to make a tutorial. I think that future came. How about you show us what is happening behind the new "room"!

      We will definitely do this too, before we clean the "house", so as not to be ashamed of the guests.
      If you noticed, we started slightly easier to shoot tutorials at a time and we will show you what is in the back.
      In general we do not try to promote "people", our stars are software and hardware are talking about.

      • Cristi-admin: I do and it definitely clean before we do, we do not shame
        If you noticed, we started slightly easier to shoot tutorials at a time and we will show you what is in the back.
        In general we do not try to promote "people", our stars are software and hardware are talking about.

        Thank you answer me. And if you want to leave something nice when you do that tutorial would be better to call someone who is good at video editing. It should come out something like the Core creativemonkeyz think.
        Cristi why not look for reliable people to help them with their knowledge and making some tutorials, but to do something for fun and not for money. I think there are enough competent people in Romania.

        • Ionel: Thank you for letting me answer. And if you want to leave something nice when you do that tutorial would be better to call someone who is good at video editing. It should come out something like the Core creativemonkeyz think.
          Cristi why not look for reliable people to help them with their knowledge and making some tutorials, but to do something for fun and not for money. I think there are enough competent people in Romania.

          With the job done for pleasure it's hard in Romania, everybody wants to make money, if you ask him what he likes to do, definitely not going to get an answer.
          Internal motor that makes him the man to perform is called PASSION, without it nothing can be done beautifully.
          Everyone runs after money, and nobody follows dream for people in Romania have dreams beyond the car and no one goes home, maybe just a bigger car and a more expensive car, so.
          All the beautiful things in the world were made of passion.
          Besides you need passion and perseverance, because you're not alone in the world, left and right will always be people who do not understand and no will or intent to deviate from your path.
          I even thought to do a tutorial / guide for young people who were thought to grasp the "thing" on the web, what to expect, how long until the first lion out how to do stuff like lion and this.
          Regarding commercial films look, these are the stuff of picture, surely we refine the presentation time but now we concentrate on content and its informational value.

          • Cristi-admin: With the job done for pleasure it's hard in Romania, everybody wants to make money, if you ask him what he likes to do, definitely not going to get an answer.
            Internal motor that makes him the man to perform is called PASSION, without it nothing can be done beautifully.
            Everyone runs after money, and nobody follows dream for people in Romania have dreams beyond the car and no one goes home, maybe just a bigger car and a more expensive car, so.
            All the beautiful things in the world were made of passion.
            Besides you need passion and perseverance, because you're not alone in the world, left and right will always be people who do not understand and no will or intent to deviate from your path.
            I even thought to do a tutorial / guide for young people who were thought to grasp the "thing" on the web, what to expect, how long until the first lion out how to do stuff like lion and this.
            Regarding commercial films look, these are the stuff of picture, surely we refine the presentation time but now we concentrate on content and its informational value.

            Thanks again, you're absolutely right in everything you said.
            Health and more tutorials!

  12. FaraVirusi said

    You said in the tutorial like Apache eating a lot more accurate 8 GB RAM, and now with the new Nginx server only eat 2 GB of memory. I say direfenta is very large, must be a trick that you did when you went to the new server!
    How you went from one server to another Live?

    • FaraVirusi:
      You said in the tutorial like Apache eating a lot more accurate 8 GB RAM, and now with the new Nginx server only eat 2 GB of memory. I say direfenta is very large, must be a trick that you did when you went to the new server!
      How you went from one server to another Live?

      On the new server we went live, I was not even a second offline. I moved everything and then I changed the DNS probably some site visitors watched the new server and the others reached the old one.
      After the servers have been updated everywhere, from all providers, site stopped old server. Certainly nobody noticed.
      We do not like maintenance pages, just what the hell we are 2012.
      On the new server configurations are done all sorts of software and hardware to withstand high traffic and I / O giant.
      The old server ate us 10 years of life, when you thought everything was going well, something happened and it was always about the web server (Apache), already when I hear about Apache it gives me a headache….
      Now we have Apache server handle anything but. Heaviness comes Nginx's load.
      Note 10 for developers who have brought to market this server.
      In other words, we must keep in mind that videotutorial.ro is not just a simple site with 20.000 visitors a day, these visitors look at tutorials, the tutorials have a very good quality 1280 × 800 and quality coding, imagine- will have 300 visitors at the same time on the site who watch (different) tutorials and scroll back and forth. The scrolling on the video player is done instantly regardless of the loading of the site, as if you had the movie on your desktop.
      Without humility, we can say that the new video content videotutorial.ro excellent move, I do not know any sites (or in any country outside) to deliver video so quickly.
      Test.
      Try to look at a tutorial, the largest that I find and carried anywhere you want, then tell me what you think.
      Our target is to seek instant and buffer 0 video, I think I succeeded, what say you?.

  13. Yes, I think it would be time to "promote" yourself, not that it would be the case. Yes it's nice and interested to see from whom you learned so many useful and interesting things !!! I really learned a lot 'I really remember in the beginning how lost I was I didn't know anything about my computer :))) but look that on this occasion I would like to thank you for your effort. Respect

    • AdrianGudus said

      sklipy:
      Oh, I think it would be timpu you and "passed" not that it fell. Yes it's fun and interesting to see from whom you have learned many useful things interesting! I even learned a lot 'I'm really remember the beginning that I knew nothing lost my desprecalculatoru)) but look at that that I must thank you for the effort vostru.Respect

      Do not know if anyone is able to decide or to say that we must defend public with our jacks that person. I for one do not agree ... if Christ wishes, is my guest but you know he's not to be public. I said and I repeat, are immortal our tutorials and I do not like show us ....
      By the way, pictures of me and Cristi have on our Google Plus https://plus.google.com/u/0/115060802821531195174/posts Moreover, we can do for our fans (I mean show us jacks in other ways, ways, positions and situations)

      • AdrianGudus: Do not know if anyone is able to decide or to say that we must defend public with our jacks that person. I for one do not agree ... if Christ wishes, is my guest but you know he's not to be public. I said and I repeat, are immortal our tutorials and I do not like show us ....
        By the way, pictures of me and Cristi have on our Google Plus https://plus.google.com/u/0/115060802821531195174/posts Moreover, we can do for our fans (I mean show us jacks in other ways, ways, positions and situations)


        Even I'm not too agreed on here, though as a colleague I glad to see pictures of you, good luck in the future!

  14. indeed apash servers consume a lot and move slowly (used by me and other friends of mine). ef good that you change on what is more performannt, There are many who have some service sometimes overloaded because they have a large number of users and do nothing about it to improve sir, because otherwise I lose visitors that you realize it will not stay a lot of people wait until the page loads then until the images load, etc.… .. I have nothing to say videoturial.ro it always went razor loading video grade 10+ I never waited until a tutorial was loaded even if I was going back and forth it goes and goes like a movie.

  15. Ms tutorial. such a request shall install phpMyAdmin and I searched the videotutorial.ro undel but we found little help please ms

    • AdrianGudus said

      Alin:
      Ms tutorial. How do I install my request for undel iauam phpMyAdminsi searched the videotutorial.ro but I gasitputin help please ms

      How did you look? As I've found? Know what you want, know what you need but do not know how and what to look for? I never understood that ....
      If you go up in the search box on the top right black border and writes there: php my admin and gave enter, found the tutorial.
      Formidable how easy was it?
      How do you do when you do not know a site simply search for an item in one?

      • AdrianGudus: How did you look? As I've found? Know what you want, know what you need but do not know how and what to look for? I never understood that ....
        If you go up in the search box on the top right black border and writes there: php my admin and gave enter, found the tutorial.
        Formidable how easy was it?
        How do you do when you do not know a site simply search for an item in one?


        If you have the impression that I didn't search, you're wrong, but honestly what I found when I entered took me to another topic that was also php my admin, in the end I asked, I didn't give a damn or I didn't want you to get so upset I thought it was a video tutorial for those with less knowledge than yours Adrian, nor how I did not think that if I post in the comment section that I need a little help for you to take me to dry jokes…
        Finally I appreciate your work and effort and I appreciate you but please try not to be ironic because it is not nice uza excuse me because I tried to ask for a little help and I look forward to the next video tutorial

        • AdrianGudus said

          Alin: If you think you're wrong but I looked sincere when I entered I found led me to another topic that was also my php admin finally asked I did not in the head or not I wanted to piss so bad I think it's a ... videotutorial for those with little knowledge of how yours Adrian, no I do not believe that if you post heading commented that I need a little help as you take me on dry jokes ...
          Anyway I appreciate your hard work and effort will stimezdar depussi please try not to be ironicpt the odd nice ... excuse me as I tried to ask for some help siastept forward next videotutorial

          It hurts when we have over 800 tutorials and you expect that in ONE search you will drop exactly what you are looking for at first, as if it is so difficult to change the search terms, to alternate the words and to press the enter key. Never, on any site with a lot of content will you get exactly the result you are looking for in ONE SEARCH. It's so hard for you to use that search and run away from it…. You probably expect someone to knock on your door and always serve you exactly what you need without you making the slightest effort.
          I wrote in the top right search box: php my admin, I press enter and I found the tutorial called: Creating a database with phpMyAdmin. Where as you can see from the title, is just about my php admin and no other thing.
          But like I said, if you do one search and you expect gold to give, it will not happen again.
          We work hard to create quality content, to inform you, we can't do the search work for you at the same time… .If we did that, what would be left for you to do? what time would we have for personal life?

  16. Hello! Thanks for the tutorial. This program was quickly installed as a server and I want to say or website of your server moves well, good connection etc. Bravo emoticon for everything you do.

  17. Attila Letai said

    Hello I have a question but do not yell at mine.Deci on this server can put two areas namely virtual server?
    Thanks for the reply.

  18. What about databases? I'm using mysql, phpmyadmin. I have not seen any information in tutorial, linked databases. XAMP, right, uses Apache, but is fully install and go to work. Waiting for an explanation in this sense. Thanks in advance

  19. Cristi when you made the index.php file what code did you put? , because it is not… and it is not visible in the video tutorial.

  20. marian said

    BUNS EVENING ...
    Hello .. Could you please post and last code ... PHP HTML. Because - YOU POST AND NOT BELIEVE ME GO Deac.
    Thank you.

  21. Madalin said

    Congratulations Cristi! very interesting tutorial, I followed the steps exactly as in tutorial and everything was super. you could do a tutorial and about 5 Concrete CMS?

  22. catalinbusiness said

    marian:
    BUNS EVENING ...
    Hello .. Could you please post and last code ... PHP HTML. Because - YOU POST AND NOT BELIEVE ME GO Deac.
    Thank you.

    Hello ! ..I can't see the last code either… and obviously it doesn't work for me either… thanks in advance!
    And last but not least I would like to thank you for all this work… I am practically a loyal subscriber of this site and I look forward to every new tutorial!
    PS Sometimes it's hard for us laymen to link a tutorial for another.

  23. Sorry maybe I was not careful but PHP file that was written about not seen in video and in description all.
    help me please
    advance ms

  24. In the index.php file type:

  25. In the index.php file is written:

  26. Sorry I guess I am not allowed to write code!

  27. Adrian Gudus said

    George:
    Sorry I guess I am not allowed to write code!

    The future use website http://pastebin.com where you are not permitted to enter the code. Just this is the role the site mentioned above, to share parts of code on forums look or where this is not allowed.
    The operation is simple, you choose what kind of code you will write, enter the code in a "box" and you will be generated a link that you can then pass on to those interested or to the people you want to help.

  28. A tutorial for linux would be perfect I have not found anything on google Romanian

  29. First I want to thank you for the job you do. You are one of my favorite sites.
    View as fixed points and seven missing 6 posting.

  30. marian said

    Cristi no offense but there is no what to write in index.php

  31. Codrin Popa said

    Welcome. You can do a tutorial on Linux nginx?
    Thank you.

  32. Hello,

    I didn't understand how I can install phpmyadmin & mysql on nginx. Can you explain to me, please? 🙂

    Cristi

  33. You wanna tell me the last code pretty please not shown

    • Adrian Gudus said

      I have the text above tutorial, îngg!

      • In the text above the tutorial, nothing appears in point 6; everyone who commented on the latest code to be put in the index.php file IS RIGHT, so don't be mean and help them. Too bad this tutorial, if you can not go further from point 6.

  34. Good evening…
    I installed nginx in WHM. The problem is that I don't know which apache or nginx works… I don't even know if nginx works… pa you can help. Thank you in advance

  35. 6. Now we need to do a file index.php that we will put in C: \ nginx \ html \ in this file we put the code after that save game. ????????????????????????? Code is not, nor nothing is seen on the video. expect urgent answer.

  36. Cornel Piteşteanu said

    if you give someone the error [out] bind () to 0.0.0.0: 80 failed (1: Operation not allowed)
    edited in nginx.conf (from 35la37 is found)

    # server {
    # listen 80;
    # server_name localhost;

    server {
    listen 8080;
    server_name localhost;

    that if you give that error you have to put the 8080 port otherwise it will not start nginx :))
    boon, now that I get rid of that error, i still have phpmyadmin installed

    • Cornel Piteşteanu said

      also in nginx.conf (line 43-36) change from
      location /
      root html;
      index index.html index.htm;
      }
      in
      location /
      root html;
      index index.php index.html index.htm;
      }

      dc to modify it so, because if you do not modify you can not see index.php in the html folder even if you do it with your ax in pc :))))
      aa, app was to forget. for those who did not know what the code was ending in index.php

      Home

      nice, "elegant," how much :))

      • Cornel Piteşteanu said
      • Good Cornel,
        I added
        index index.php index.html index.htm;
        in nginx.conf but still does not load localhost / index.php

        We have noticed that PHP's starting line is:
        C: \ NginX \ php \ php-cgi.exe -b 127.0.0.1: 9000 -c C: \ NginX \ php \ php.ini
        but in C: \ NginX \ php I do not have php.ini only php.ini-development and php.ini-production
        the PHP version is 7.1.8

        • After all, I managed to get him started!
          I also found a tutorial:
          https://techtuts.info/2014/04/install-nginx-php-windows

          Line index index.php index.html index.htm; from nginx.conf communicates to the browser the order in which to search for the "start file" error…)

          We renamed php.ini-production in php.ini

          To run php-cgi.exe and nginx.exe as services, I used NSSM (http://nssm.cc/download)
          Start.bat file (must be run with administrative rights)
          @ ECHO OFF
          C: \ NSSM \ nssm.exe install “Nginx Server” “C: \ nginx \ nginx.exe”
          C: \ NSSM \ nssm.exe install “PHP Server” “C: \ PHP \ php-cgi.exe” -b 127.0.0.1:9000 -c C: \ PHP \ php.ini
          C: \ NSSM \ nssm.exe start “Nginx Server”
          C: \ NSSM \ nssm.exe start “PHP Server”

          The stop.bat file (must be run with administrative rights)
          @ ECHO OFF
          C: \ NSSM \ nssm.exe stop “Nginx Server”
          C: \ NSSM \ nssm.exe stop “PHP Server”
          C: \ NSSM \ nssm.exe remove “Nginx Server” confirm
          C: \ NSSM \ nssm.exe remove “PHP Server” confirm

          The code in index.php is https://pastebin.com/3J0zLvkN

Speak Your Mind

*