HomeХобби и стильRelated VideosMore From: Clever Techie

How to Install Apache Server on Windows

438 ratings | 136230 views
In this video on how to install Apache server on Window, since we're not using windows installer (MSI) for this latest Apache version 2.4.16, we need to MANUALLY install Apache as a service on Windows. Here is how to do it: Open your Apache bin folder, hold shift and right click anywhere in the empty space and click on "Open command window here" this will open the command prompt with Apache directory, then type: httpd.exe -k install -n "Apache2.4" this will install Apache as service and when you open ApacheMonitor.exe the Apache service will be there, done! How to install Apache server 2.4.16 VC 14 (as of July 28th, 2015) and have it running on Windows 7. VC14: Visual Studio Redistributable 2015: http://www.microsoft.com/en-us/downlo... VC11: Visual Studio Redistributable 2012: http://www.microsoft.com/en-us/downlo... VC9: Visual Studio Redistributable 2008: http://www.microsoft.com/en-us/downlo... `````````````````````````````````````````````````````````````````````````````````````````````` Hey guys, I'm now using Patreon to share improved and updated video lesson material. For a small fee you can access all the downloadable files from this lesson (source code, icons & graphics, cheat sheets) and everything else included in the video from the patreon page. Additionally, you will get access to ALL Clever Techie videos in HD format with no ads. Thank you so much for supporting Clever Techie :) Download this video's files here: https://www.patreon.com/posts/how-to-install-20810613 ( This unlock includes access to ALL Clever Techie channel videos in HD 1080p quality format with all video ads removed! ) ````````````````````````````````````````````````````````````````````````````````````````````` ( Website ) https://clevertechie.com - PHP, JavaScript, Wordpress, CSS, and HTML tutorials in video and text format with cool looking graphics and diagrams. ( YouTube Channel ) https://www.youtube.com/c/CleverTechieTube ( Google Plus ) https://goo.gl/J71p6f - clever techie video tutorials. ( Facebook ) https://www.facebook.com/CleverTechie/ ( Twitter ) https://twitter.com/theclevertechie ``````````````````````````````````````````````````````````````````````````````````````````````
Html code for embedding videos on your blog
Text Comments (169)
OnLine Baba G (4 days ago)
hy anyone can en light me when i change the DocumentRoot "${SRVROOT}/htdocs" <Directory "${SRVROOT}/htdocs"> to the DocumentRoot "c:/localhost" <Directory "c:/localhost"> my apache service monitor is not working it gives me the error "The requested operation has failed"...... any suggestion?? what to to do +Clever Techie
arpita banerjee (22 days ago)
i am seeing this after writing local host option in browser.. Server Configuration wamp server(i installed wamp server before) Apache Version: 2.4.33 - Documentation PHP Version: 5.6.35 - Documentation Server Software: Apache/2.4.33 (Win32) PHP/5.6.35 - Port defined for Apache: 80 #what does it mean ?my apache is working or not>??
Punith Basavaraju (1 month ago)
I am unable to start the server because its showing requested operation has failed
Derly Pacheco (1 month ago)
verry good
Brilliant! Thanks a lot😊
ATOM ZEUS (4 months ago)
what theme do u use
Alejandro Chávez (4 months ago)
Thank you man!
HelKumar Shrestha (5 months ago)
I have public static Ip, registered domain. Is it possible to host website build in .html from my office?
PPTX. Creative Studios (6 months ago)
Need to change your server name to localhost:80
girish lc (7 months ago)
Thank you!
Alejandro Martínez (7 months ago)
Thank you.
DavidsKanal (8 months ago)
8:00 you know he does porn
Shroog Sash (8 months ago)
thank you man, it finally works, great job
sha p (8 months ago)
Thank you so much , but in Apache Service Monitor nothing is showing what should I do ???
SignalSource (8 months ago)
Clever Techie, is so funny:) ---listen:--64bit, appache ohh my lord:)), the best!!
Reda Marzouk (9 months ago)
8:02 dude i'm gonna subscribe !!!!!
Wellington Telles Cunha (9 months ago)
Perfect... I need to make this apache communication save...what do you recommend? Best Regards
Gowtham Karnan (9 months ago)
the apache monitor is not openeing ..it show " The requested operation has failed "
Ken Le (11 months ago)
For those of you that is not working, you need to log onto your cmd as Administrator By doing that, type cmd on the search bar right click on the cmd and set it as Administrator
Jones Crimson (11 months ago)
For people who want to know more, I recommend the Build Podcast episode 036, admittedly a bit outdated but still good.
Mr. Spaghetti (11 months ago)
Hi, people... If you still have an error while starting apache. I'm backing up the line in the "httpd.conf" file to this "c:/Apache24/htdocs". Then run in cmd as an administrator. "httpd -k start". In a web browser, type "localhost" and write that it is working.
Tech Machi (1 year ago)
Thank u..... It's really helpful....
gladiator 123 (1 year ago)
raulmorel1 (1 year ago)
Syllith (1 year ago)
Thanks but next time don't explain that we should use winrar for like 30 seconds. We got it. I'm sure if we're setting up a web server we know how to extract zips
No One (1 year ago)
When I Click on "Start" it says the operation has failed!!
Jon johnieee (1 year ago)
I did everything here but there still is no service installed. I am on window 7 professional desktop. I have read the comments and even in cmd it says no directory. I am using a netgear powerline, which basically plugs into the wall socket and plug into the modem to my internet then the other one plugged into a socket in my room and it is ran ethernet. I don't have direct plug in to the modem....does this matter at all
Troy Lawson (1 year ago)
This worked great, other than you forgot the httpd -k install in cmd as admin. Thank you.
T K (1 year ago)
And also navigate to "services"->"apache"->setup type: automatically. If u get the error "The requested operation has failed" go there and try to start it there first. That went fine for me. :) Also u can try to check if your port used for apache is already reserved for IIs or Skype. Go for cmd as admin and type: "netstat -nao" then " tasklist /fi "pid eq PID HERE!!" " to check which task is using the port. ;)
Darshan A.N. (1 year ago)
apache monitor is started but in xampp its showing error, solution please....
Vanajakshi Chinnu (1 year ago)
sir while running i get index of/ instead of It works! is it right one had i connected apache? plz answer for this question sir
Meme hell (1 year ago)
To everyone who get error "The requested operation has failed", stop program that uses port 80 and you will be fine :D
Mahmoud Elwelily (11 months ago)
Jay Tilekar (1 year ago)
When i type localhost/ in browser i get this message " Index of /"............plzz help me
Meme hell (1 year ago)
start coding, put index.php or index.html
gove gove (1 year ago)
Apachi is not installed because api-ms-win-crt-runtime-l1-1-0.dll file is missing how to install this file......
SMASHINGmedia (1 year ago)
Whats all this with local host. I need to get this going for real projects, online, using the internet.. Anyone got any tips on a tutorial that shows how to make it work, not only on local?
kaoutar chakroun (1 year ago)
i've follow the steps as you did but i can't have any service appearing in the window of the apache service monitor! Help plzz !!
Pooja D (1 year ago)
hello sir i followed all your instructions but still my server is not working..please suggest me something..
Kieran Brown (1 year ago)
You've forgotten 2 vital pieces of information.  1: Restart your PC as Skype etc can be using port 80, the info on this can be found @ https://stackoverflow.com/questions/15016119/succeeded-installing-but-could-not-start-apache-2-4-on-my-windows-7-system And 2: c:\apache24\bin\httpd.exe -k install              This needs to be used if you are installing it fresh, and finally.... You didn't tell us how to add environment variables..... But other than that it is a great tutorial!
Abir Basu (1 year ago)
Thanks a lot...!!!
Praveen Chopra (1 year ago)
I am not getting any thing in appache monitor
Praveen Chopra (1 year ago)
this is not working
kjemradio (1 year ago)
Two things. First you cannot rename the directory to c:\localhost. It will fail to start Apache. What you can do is rename the htdocs directory to www (or leave it as it doesn't matter) and point your browser to localhost. You should see this IT WORKS message. Next he didn't mention this but it is good security practice. Remove the Indexes option to prevent people from accessing your entire directory. I used Notepad ++ and it was located at line 259. Yours will say Options Indexes FollowSymLinks, so just place your cursor where Indexes is, delete and save. Whether your Web server is for testing, or actual production it is ALWAYS good practice never to use the default settings.
kjemradio (1 year ago)
htdocs is a folder inside of Apache2 (if you go through Windows Explorer and search the Apache2 folder you should see the htdocs folder. That's what you can rename to www. I rename mine because www that's really what the name should be. This is the folder to which all of your web pages, js, css, etc. all go. That's the folder I was taking about renaming. Local host means your local IP address on your computer (like 192.168.whatever.whatever) So when you open your browser you type that local IP into the address bar, and it should take you to the Apache .htm page to let you know everything is working. You are deleting the word indexes to prevent access to your directory list (this directory shows every file for your webpage. Removing Indexes does mean you will have to type the exact name of the web page you want to view on your Apache server. Example: or If you do this: you will get a 403 forbidden error. That['s because you deleted the Indexes, and it is preventing you from seeing it. That's what you want. You never want people to have access to the directory because it's easier for them to steal your content. Hope this helped.
MONTAK (1 year ago)
Do you mind elaborating for us absolute newbies? When you say rename the htdocs directory, are you talking about in the config text file? And you're literally renaming it "www" instead of "c:/localhost" like he said to? And what does "point your browser to localhost mean? Is that the same as typing localhost into the address bar? When you say "place your cursor where Indexes is", does that mean before or after the word indexes? And then we just delete everything until the next line? Thank you!
Nany Talibany (1 year ago)
Thank youu !!!!!
Lewis Tao (1 year ago)
Do I have to use firefox?
Lewis Tao (1 year ago)
Just wonder, when can I install MySQL? before Apache install, or after Apache install? - Thanks!
Kevin Perry (1 year ago)
hey, I added and index.html file to my localhost folder and when I type localhost/ in my browser i get a 404 error. My service is running, I changed the listen to 8080. any suggestions?
Kevin Perry (1 year ago)
I just tried "localhost:8080" and it works then. Why do you not have to had :8080?
Rui Li (1 year ago)
Very clear, and many details are also showed in this video. Thank you so much.
MrHuaquito (1 year ago)
you say nothing about "Use the PGP Signature and/or the SHA Checksums to verify the integrity", that' is vital too.
Clever Techie (1 year ago)
No problem!
Manish Goswami (1 year ago)
@Clever Techie links are not working properly.
Thottakkot Hafeed (1 year ago)
Not working Apache server not working
Rohit Mengu (1 year ago)
after doubling clicking apache service monitor it shows starting, but in my case the request is failing every time....pls reply
Gregor Robič (1 year ago)
You probably forgot to create a folder "localhost" in c... At least i did, and this worked for me.
Mohamed Yare (1 year ago)
thanks allot i have got where i can download the apache
Killer Thoughts (1 year ago)
you' r cool dude... i like ur style
gsb005 (2 years ago)
Can you please also show us, how to configure openssl to work with apache, please. Great Video.
Hemant Singh Bohra (2 years ago)
its not working the apache server is not starting
I believe that there is a mistake inside httpd.conf...like a LoadModule, ServerName, Access to Directory, DocumentRoot.... check inside logs (apache) folder... and please put the error message
Tài Nguyễn Thành (21 days ago)
+Wellington Telles Cunha yes, I have, it works, but i have new issue : Windows could not start the Server service on Local Computer
Have you include apache folder in your PATH Windows variable?
Tài Nguyễn Thành (21 days ago)
+Wellington Telles Cunha httpd.exe is not recognized
Wellington Telles Cunha (9 months ago)
CMD >> httpd.exe -k install -n "Apache2.4"
Palestine ESport (2 years ago)
how the astronaut can drink through his Helmet :p
tom dixon (2 years ago)
If "c:localhost" does not exist, then modifying DocumentRoot and Directory in the httpd.config file as advised in the video will result in empty service status box. To solve, just create "localhost" folder in c: or just don't modify httpd.config file
tom dixon (2 years ago)
did you try creating a folder "localhost" in c:? that should do it.
Benoit Talbot (2 years ago)
thanks you so much !
Benoit Talbot (2 years ago)
-------IMPORTANT FALLOW THIS STEP ----&#173;&#173;--- ----Phil Tayloril say--- If you're doing this from scratch you need to install the apache service. To do this go to programs , type CMD right click cmd and run as administrator, navigate to c:\apache24\bin and type httpd.exe -k install If you don't this you are not going anywhere with this tutorial.
onwu gideon (2 years ago)
hello I have mine setup and running well. challenge is I'll like to make it accessible to other computers on my LAN. can you point me in the right direction pls
Balawal Ali (2 years ago)
i also follow your steps but there is no apache service monitor(it shows no services installed) how to fix this problem.tell me pls
UnturnedBros (2 years ago)
Whats the problem when I cant just run the wampserver. Its still offline :/
SoftwareSnare (2 years ago)
Oh My God you are man ? 1TB is full you hard disk no oh no i am gone insane
nikolai ganovski (2 years ago)
more like 4TB 8:00
Chuckles (2 years ago)
So with the conf file I made it goto c:/localhost and made localhost folder on the C drive but there is no index.html in it or any other files/folders, any help would be appreciated.
Balaji Ram (2 years ago)
Brilliant, such easy to follow steps. Except for one missing step regarding install that XeX Zephy mentioned above, everything else is very good in this tutorial. cd c:\Apache24\bin httpd.exe -k install -n "Apache2.4" Thank you all.
Phil Taylor (2 years ago)
If you're doing this from scratch you need to install the apache service. To do this go to programs , type CMD right click cmd and run as administrator, navigate to c:\apache24\bin and type httpd.exe -k install If you don't this you are not going anywhere with this tutorial. .
CYBERNEMESIS/FR (8 months ago)
I don't have a "bin" folder in apache24. Could you help ?
Matt Sleasman (11 months ago)
Try to change your directory to c:\apache24\bin in the command prompt use the command "cd /d c:\Apache24\bin" and then type in "httpd.exe -k install"
Jack Aylward (1 year ago)
when I enter in "c:\apache24\bin" it comes up with 'c:\apache24\bin' is not recognized as an internal or external command, operable program or batch file. please help, thanks
bryan rojas (1 year ago)
thank you <333333
Phil Taylor (2 years ago)
when I open the apache monitor there's nothing there, which makes me wonder why would there be a service when we've just extracted a file a placed it in a folder. In the monitor the connect button doesn't list me pc name, even putting it in manually does nothing. Help!
sibusiso ndimande (1 year ago)
Same here dude. Did you eventually figure it out ?
Yruam Bojorquez (2 years ago)
how do i create localhost ?
Phil Taylor (2 years ago)
+maury castro Go to your drive by clicking on programs ( Bottom left most windows button ) computer, click on your c drive, then within that window , look for "New folder " it's a menu option at the top, click on that and then rename it (right click ) to localhost.
Raphael Yao (2 years ago)
Thanks , it works.
Arthchie Almirante (2 years ago)
its says that "The Request Operation has Failed"
Matheo Liscano (2 years ago)
Joakim Lindfors (2 months ago)
Doesn't work for me, it says the httpd.exe file isn't recognized as an internal or external command/program/bat. How come?
Wellington Telles Cunha (9 months ago)
Hausa24 TV (9 months ago)
Wellington Telles Cunha is this the solution?
Wellington Telles Cunha (9 months ago)
CMD >> httpd.exe -k install -n "Apache2.4"
Phil Taylor (2 years ago)
+Matheo Liscano see what I've just posted above. He left it out.
DGalacticMan (2 years ago)
What to do if I get the error msg 'The requested operation has failed!'
Asif Hassan (2 years ago)
Don't have any Service in Apache Monitor window under Service Status. Will you help me please? I have installed Apache in C:\Program Files\Apache24
Ayman Sayed (2 years ago)
I got the following error when I tried to do the command " httpd -k install" The 'Apache2.4' service is successfully installed. Testing httpd.conf.... Errors reported here must be corrected before the service can be started. httpd: Syntax error on line 525 of C:/Apache24/conf/httpd.conf: Cannot load php5 apache2_2.dll into server: %1 is not a valid Win32 application.
Ayman Sayed (2 years ago)
Thank you for your great tutorial. But I have a problem when I tried to initialize the service. Requested failed although I changed the Listen Port 8080
Mr Teeth (2 years ago)
Cool, thanks for the tutorial!
Christian Degn (2 years ago)
As a note: If you use Skype. Exit out of Skype.
Ethan Fischer (2 years ago)
+Christian Degn I was getting "The requested operation has failed" until I did this. Thanks!
Eirini Goudarouli (2 years ago)
Hey Clever Techie, this is brilliant! I had an empty monitor and I followed your directions regarding httpd.exe -k install -n "Apache2.4. However, it still shows me a message which goes like that: AH00369. Access failed to open the windows service manager, perhaps you forgot to log in as Admin? I run the apache.exe as Admin though, What do you suggest?
Chrys's music (8 months ago)
Thanks bro..u saved me
Eliot Channel (11 months ago)
Eliot Channel (11 months ago)
how do you run it as a admin at the same time
Phil Taylor (2 years ago)
+Fong Sow Leong see above
Phil Taylor (2 years ago)
+iregood see what I've posted above.
Abdulrahman Alrifai (3 years ago)
i did as u do but there no apache in server monitor
Luis Gustavo Rangel (7 months ago)
for me, work the command ".\httpd.exe -k install" , thanks bro
Di Ch (1 year ago)
If you're doing this from scratch you need to install the apache service. To do this go to programs , type CMD right click cmd and run as administrator, navigate/TYPE "cd c:\apache24\bin" and type "httpd.exe -k install" If you don't this you are not going anywhere with this tutorial.
XeX Zephy (2 years ago)
+Igor Lacik idk u just need to put them
Igor Lacik (2 years ago)
+XeX Zephy What does the -k / -n mean?
XeX Zephy (2 years ago)
+kevin cubitt u need to run cmd as admin once u done that type: "cd C:\Apache24\bin" when u type that u want to then type: "httpd.exe -k install -n "Apache2.4" then it should install
magnumataredfox (3 years ago)
winrar sux, use 7zip
Music Core (3 years ago)
thanks for the tut, but like.... i think it's time for a new microphone
Tomislav Gruber (3 years ago)
I did everything according to tutorial and managed to get service Apache 2.4 in Apache monitor but when I try to Start it error appears "The requested operation has failed". Any solution?
Srikanth Ramanan (3 months ago)
Gregor Robič thanks man 👍
Kibadynamic ' (10 months ago)
Thanks, I did that and worked
Gregor Robič (1 year ago)
You probably forgot to create a folder "localhost" in c... At least i did, and this worked for me.
osamabindrinkin40s (1 year ago)
I get an error message saying "Your current settings do not allow this file to be downloaded". Hoe do I fix this? I'm using Windows Server 2008.
SirWaffleGaming (2 years ago)
I don't even have Skype open but I'm still getting the error. The only things I'm running are Chrome and Windows Explorer.
Harish Yadav (3 years ago)
Hey i am doing as same as you but when i try to open apache moniter form bin folder then i found a error as api-ms-win-crt-runtime-l1-1-0.dll is missing, Please tell me what to do with this.??
Harish Yadav (3 years ago)
Hey i am doing as same as you but when i try to open apache moniter form bin folder then i found a error as api-ms-win-crt-runtime-l1-1-0.dll is missing, Please tell me what to do with this.??
Gopi Krishnan (3 years ago)
I have installed "Visual C++ Redistributable for Visual Studio 2012" in my computer, and even after that I still receiving dll files missing error messages. Please suggest.
Susheel Lamsal (3 years ago)
+Gopi Krishnan Install Visual C++ Redistributable for Visual Studio 2015 and make sure you check for windows updates and install the latest updates.
Sub Zero (3 years ago)
Thanks Clever Techie - thorough explanation on how to install Apache. Thumbs UP! Now onto your PHP install video. :)
Clever Techie (3 years ago)
+Sub Zero (ClassicMan187) I don't even know what you're talking about, could you please elaborate?
Sub Zero (3 years ago)
+Clever Techie Could you explain why you never ran through the PGP signature verification ? Is it an important step to go through - I've installed the software, but didn't even go through verification of the keys/checksums etc....
Ian Riley (3 years ago)
you completely forgot to go over what to do in DOS
Jason Graham (1 year ago)
navigate to c:\apache24\bin and type httpd.exe -k install
Clever Techie (3 years ago)
+Ian Riley Do what in DOS?
Anonymous (3 years ago)
my apache service monitor is empty... what can i do?
bunnybee (2 years ago)
+TheDeadline47 In conf file change listen port to 8080 and it should work, by default it is 80
TheDeadline47 (3 years ago)
+Clever Techie First of all Thank you so much, Your video tutorial is very helpful, But when i click start in apache monitor then this error occurs"THE REQUESTED OPERATION IS FAILED" and remain like this"THE APACHE2.4 SERVICES ARE STARTING". I need a quick answer please. Thanks.
Tahira Aiedail (3 years ago)
+Clever Techie thanks for the help so far :) But now I have another problem. It says: Testing httpd.conf.... Errors reported here must be corrected before the service can be started. AH00072: make_sock: could not bind to address AH00451: no listening sockets available, shutting down AH00015: Unable to open logs There's also written in brackets, that the address normally gets and should be only used one time.  I don't have enough knowledge to be able to change this without someone helping me so please help me again out :)
Red Eyez (3 years ago)
+Clever Techie yes and I think this is better but I had difficulties so I had to go back to xampp but this video really helped.
Clever Techie (3 years ago)
+Red Eyez The whole point of these videos is NOT to use XAMP, WAMP or any other XYZKLMNOAMP, this lets us control when we want to upgrade our versions of Apache, PHP and generally have more control over all the settings.

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.