A few additional tips: Problem: httpd: Syntax error on line 39 of C:/PHP/Apache24/conf/httpd.conf: ServerRoot must be a valid directory Fix: Ensure that your Apache folder is in the proper directory, under the C:/ directory (in this example) Problem: Installed Apache Service in the wrong location? Fix: use the command "sc delete apache2.4" to delete the Apache service. If you do this, you'll have to run httpd -k install again to reinstall though
If you've already installed the service as well you'll need to edit the Image path as well. Go to Run, regedit, go to the directoy: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2.4 Once you're there right click Image path and update it to the new directory you unzipped to. Full string should look like this once you're done. "C:\Apache24\bin\httpd.exe" -k runservice Mine worked after that.
1:51 TIP SHORTCUT (FOR CMD) METHOD 1: Click your path bar in your explorer (top part that says "c:\bla\bla\bla" - delete what is there and just type "cmd" METHOD 2: Shift+Right click in a blank space within this folder and you will see a new item called "Open command window here" Hope that helps!
I'm getting a: Windows could not start the apache2.4 service on local computer. Error 2: the system cannot find the file specified. ------- Also, I've tried learning /following with lots of people on many different programming languages. This is the first time I actually understood. Thanks a bunch👍🏼
Thanks for this vid! One problem I had run into was the ServerRoot being linked to the wrong directory. "httpd: Syntax error on line 37 of C:/Apache24/conf/httpd.conf: ServerRoot must be a valid directory" Just a heads up to others, you must locate this file "..\Apache24\conf\httpd.conf" open and edit the var "SRVROOT" (I found this var at line 37). Change the file path to whatever folder "Apache24" is in. In my case, it was from " Define SRVROOT "C:\Apache24" " to " Define SRVROOT "C:\httpd-2.4.52-win64-VS16\Apache24" " Hope this helps anyone that may have ran into this problem!
For me when installing it says: Could not reliably determine the server's fully qualified domain name, using fe80::dcf0:6d80:e5c1:d0c5. Set the 'ServerName' directive globally to suppress this message
@@FlavorOfTheMonthChannel Thank you! Could you please leave the link to the next video where you add PHP if it exists? I couldn't find it on your channel.
thank you very much! My main server is running apache with php and sql addons, but I wanted apache installed on my laptop so when I am writing code on the go, I can test my code
1. When running cmd it says an error must be corrected before the service can be started. Syntaxes error on line 39 of C:/users/ .......... 2. Windows can't start service
Great info! I love how quickly and concisely you went through the material. You can also just paste in the Apache24 folder's location in that config file (unless there's another reason later, because it works otherwise to get started).
Hi! When I put 127.0.0.1: Opens a page: Apache/2.4 OpenSSL This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page, it means that the web server installed at this site is working properly, but has not yet been configured. What can I do?
The installation went well except for the error I get from httpd: Syntax error on line 39 of C:/PHP/Apache24/conf/httpd.conf: ServerRoot must be a valid directory. I can't seem to get it fixed right. I need help! Can you give me an example?
When I try to start the service I get a services message that says "windows could not start the Apache2.4 on local computer...refer to service-specific error code 1." Do you have any advice for how to resolve this issue? Thank you.
I have a problem, i followed all your steps now the website is live and running in my pc but how to run it on other devices. I simply means I wanna show my friends what I did but the ip address is not working for them😅
@@itztoofan I could make a tutorial for this next. I suppose I've kind of dragged my feet on it because hosting an apache server publicly online comes with a lot of security risk. This tutorial is more so for the first step, which many people use for local/company networks. I'm curious to hear your thoughts though!
Sorry for the delayed response. You can find the error log for Apache, which will contain more details at: C:\Apache24\logs\error.log. Perhaps your virtual machine has a different version of Windows other than Windows 10. What VM are you using?
Hi , Thanks for tutorial.. Is it safe to download & Install directly in production environments or Do we need to compile apache httpd binaries before installing in production systems.. kindly answer...
You are a god. I unironically cheered when it showed me at the end "It works!" P.S. it may seem simple for experienced developers but I'm a new student, and my uni's guide was hopeless so i decided to figure it out myself, which it didnt work
Ive followed the video but in PhpMyAdmin i get an error at the bottom saying "Invalid server index: " and the drop down choice box shows 2 "Localhost" servers". Any clues you could help me. TIA
In your windows services list (go to start menu, type in "services"), do you have more than one service running for Apache? Also, are you trying to set up PhpMyAdmin for MySQL? The error "Invalid server index" would make me think that there's a phpmyadmin config that is looking for apache, but it's got the improper list / references to point to your apache 2.4 install. I'll be making a follow up video soon for installing MySQL to the webserver as well, so maybe that'll help.
@@FlavorOfTheMonthChannel Thanks for the swift reply, I found the problem in the config file. When I edited it I placed some code before the $i = ++ which I guess was skipping the first couple of variables I added. Cheers
After starting the service I am getting an alert saying "Windows could not start the Apache 2.4 on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service- specific error code 1." Please help 🙏
Yep, this service should start when Windows starts up. It can read PHP, but make sure you follow these steps to get PHP set up: ua-cam.com/video/VwObm3qvS3Q/v-deo.html
Very nice video. Question, is it possible to install apache in a VM in a local pc and also install django there and server this out to internet, or for more practical purposes to a intranet or network?
In many cases, the server will be virtually hosted on a cloud platform like "digital ocean" to accomplish this. You could put the server with Django on either your local computer, a VM on your local computer, or a VM on a server hosting platform, if desired. Generally speaking, most people/companies host the server on a virtual hosting service that they pay for, so they don't have to deal with any of the hardware issues of running their own server.
The httpd.exe file depends on the extract to location being the C: drive. If you have it anyway else you have to edit the directory in the httpd.exe file. Trust me there's too much to edit. Just delete the file and re-extract the zip file to the C: drive. If you've already installed the service as well you'll need to edit the Image path as well. Go to Run, regedit, go to the directoy: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2.4 Once you're there right click Image path and update it to the new directory you unzipped to. Full string should look like this once you're done. "C:\Apache24\bin\httpd.exe" -k runservice Mine worked after that.
A few additional tips:
Problem: httpd: Syntax error on line 39 of C:/PHP/Apache24/conf/httpd.conf: ServerRoot must be a valid directory
Fix: Ensure that your Apache folder is in the proper directory, under the C:/ directory (in this example)
Problem: Installed Apache Service in the wrong location?
Fix: use the command "sc delete apache2.4" to delete the Apache service. If you do this, you'll have to run httpd -k install again to reinstall though
I had to edit the conf file and change it to the correct drive letter. Otherwise worked well.
If you've already installed the service as well you'll need to edit the Image path as well. Go to Run, regedit, go to the directoy: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2.4 Once you're there right click Image path and update it to the new directory you unzipped to. Full string should look like this once you're done. "C:\Apache24\bin\httpd.exe" -k runservice Mine worked after that.
You're a champion for this!
@@RolloTompson1231 Yo im stuck where do i edit the image
thanks man!
1:51 TIP SHORTCUT (FOR CMD)
METHOD 1: Click your path bar in your explorer (top part that says "c:\bla\bla\bla" - delete what is there and just type "cmd"
METHOD 2: Shift+Right click in a blank space within this folder and you will see a new item called "Open command window here"
Hope that helps!
Never knew this, thanks! Very cool trick
Very underrated channel! Probably the only decent video tutorial out there showing how to install apache.
This video contains exactly what the title describes. Thank you! it worked perfectly!
Thanks for the feedback! I'm glad it worked :D
10/10 tutorial, im not even overexaggerating like some people do, the tutorial does exactly the title says in 5 minutes
Thanks! :D
127.0.0.1 shows me "Access Denied", but the .html file showed me it works! Great tip!
I tried Apache in 2015. Thanks for your video.
I'm getting a:
Windows could not start the apache2.4 service on local computer.
Error 2: the system cannot find the file specified.
-------
Also,
I've tried learning /following with lots of people on many different programming languages.
This is the first time I actually understood.
Thanks a bunch👍🏼
you can try to type C:\Apache24\bin>httpd.exe -h install and then proceed to type httpd.exe -k install
For your errors, how did you resolve it?
Thank you, this is the only explanation my illiterate brain was able to understand!!
Saved me 👍
Really great video and the pinned comment really helped with the installation process!
Just want to say this is a very good tuturiol, very quick and easy. Thank you for producing it.
What do you do if it says
Windows could not start the apache2.4 on local computer.
Thanks a lot. Quick and well planned guide. Everything needed is covered quickly.
Great video. Simplest one I have seen and installed with ease. Many thanks. Off to look at your PHP one now.
Thanks for the feedback! I'm working on a video for adding in the MySQL database portion as well, soon to come
pro tip when you are at that directory in file explorer instead of copying and pasting the path, type CMD and it will launch cmd to that exact path!
Thanks for this vid!
One problem I had run into was the ServerRoot being linked to the wrong directory.
"httpd: Syntax error on line 37 of C:/Apache24/conf/httpd.conf: ServerRoot must be a valid directory"
Just a heads up to others, you must locate this file
"..\Apache24\conf\httpd.conf" open and edit the var "SRVROOT" (I found this var at line 37).
Change the file path to whatever folder "Apache24" is in.
In my case, it was from
" Define SRVROOT "C:\Apache24" "
to
" Define SRVROOT "C:\httpd-2.4.52-win64-VS16\Apache24" "
Hope this helps anyone that may have ran into this problem!
You're an actual legend. I hope he sees this and adds it to the pinned comment. For anyone wondering, THIS IS THE FIX!
thanks so much dude
Love you brother! Thanks!
Thank you so much! For this to work put it in your c drive all under a folder called Apache24. Putting it under other files breaks it I guess.
For me when installing it says: Could not reliably determine the server's fully qualified domain name, using fe80::dcf0:6d80:e5c1:d0c5. Set the 'ServerName' directive globally to suppress this message
I have the same error where u able to fix it bro
Subscribed. But but I see people's petty attitude, coming here, watching the video, getting the knowledge, and leaving without liking or subscribing.
Thanks, much appreciated! :D
Super helpful, Thanks for taking the time to make this video!
how do we connect the local website up to the internet?!?
So, if I would like to add a java script or css file, I'd do it on the htdocs folder?
Yep, that's correct. You can either add new files in the htdocs folder, or just write the javascript/css directly into the index.html file.
@@FlavorOfTheMonthChannel Thank you! Could you please leave the link to the next video where you add PHP if it exists? I couldn't find it on your channel.
@@ESEben10 Sure! Here it is:
ua-cam.com/video/VwObm3qvS3Q/v-deo.html
thank you very much! My main server is running apache with php and sql addons, but I wanted apache installed on my laptop so when I am writing code on the go, I can test my code
Thank so much! You helped me a lot. This video was short and useful!
but notNice tutorialng seems to work. Tried built-in content, and scarlett solo. What's the hardware you have? windows mac? special soft card?
1. When running cmd it says an error must be corrected before the service can be started. Syntaxes error on line 39 of C:/users/ ..........
2. Windows can't start service
Life saver thank you so much for this video. It was quick simple and easy 🎀 may God bless you
Exactly what I was looking for, thank you!
Thanks! This is just what I needed :)
Thanks for the guidance, Sir.
Great info! I love how quickly and concisely you went through the material. You can also just paste in the Apache24 folder's location in that config file (unless there's another reason later, because it works otherwise to get started).
Can the server be accessed publicly (not on the same network) ?
Hey, I would like to see the rest of the videos
Thank you so much for this video! This really saved my day
Hi! When I put 127.0.0.1:
Opens a page:
Apache/2.4 OpenSSL
This page is used to test the proper operation of the Apache HTTP server after it has been
installed. If you can read this page, it means that the web server installed at this site is
working properly, but has not yet been configured.
What can I do?
did you solve it?
The installation went well except for the error I get from httpd: Syntax error on line 39 of C:/PHP/Apache24/conf/httpd.conf: ServerRoot must be a valid directory. I can't seem to get it fixed right. I need help! Can you give me an example?
Thank you so much for your video. It helps me a lot. Thanks sir!
i love this guy
It was very helpful.Thanks
What if the access get denied ?
I cannot start Apache services from 3:20 :(
hello! i would like to ask whether i can later connect this to a mysql platform? thanks!
Thankyou so much for this video❤
When I try to start the service I get a services message that says "windows could not start the Apache2.4 on local computer...refer to service-specific error code 1."
Do you have any advice for how to resolve this issue? Thank you.
same $hit
Same error message
up
please tell me if you find out how to fix
@@professorpennies Found it?
Please How can I ssl by installing kind of self certificate
Thanks it worked for me
dayummmmm it works wellll!!
🍃🍃
That was sooo Groovy!
I have a problem, i followed all your steps now the website is live and running in my pc but how to run it on other devices. I simply means I wanna show my friends what I did but the ip address is not working for them😅
Any solutions on relation to this issue please
@@itztoofan I could make a tutorial for this next. I suppose I've kind of dragged my feet on it because hosting an apache server publicly online comes with a lot of security risk. This tutorial is more so for the first step, which many people use for local/company networks. I'm curious to hear your thoughts though!
I can’t seem to install this on my virtual machine I get hit with an error that says “the application was unable to start correctly”
Sorry for the delayed response. You can find the error log for Apache, which will contain more details at: C:\Apache24\logs\error.log. Perhaps your virtual machine has a different version of Windows other than Windows 10. What VM are you using?
Hey, how would one enable a mod_rewrite?
Thanks man. Congrats for it!
Thanks a lot, this video saved a lot of time 👍
Quick and Easy. Thanks!
Excellent, always want to save my viewers time & get to the true process of setting these things up! Thx for the feedback
I keep getting error 5, access is denied. I am using admin account and running as administrator
Hi , Thanks for tutorial.. Is it safe to download & Install directly in production environments or Do we need to compile apache httpd binaries before installing in production systems.. kindly answer...
I'm getting this after install command "Set the 'ServerName' directive globally to suppress this message"
did you solve this problem. i am gettin it also
@@rebeltime6413 me to
Can I somehow just lunch it, without installing ?
Thank you! It really works. Great
I would like a tutorial for getting an apache server to connect to the internet.
Could not get services to start apaches.
Somthing about sintax line 39 being wrong on cmd
Code 1
how to make server for global access??
Thanks its help me out and next how to install php after apache installed ?
Great Help! Thank you.
Thank u !! it works for me
Thank you for the tutorial.
It works!!!
You are a god. I unironically cheered when it showed me at the end "It works!"
P.S. it may seem simple for experienced developers but I'm a new student, and my uni's guide was hopeless so i decided to figure it out myself, which it didnt work
i want deploy my html file on web server how can i do that??
Ive followed the video but in PhpMyAdmin i get an error at the bottom saying "Invalid server index: " and the drop down choice box shows 2 "Localhost" servers". Any clues you could help me. TIA
In your windows services list (go to start menu, type in "services"), do you have more than one service running for Apache? Also, are you trying to set up PhpMyAdmin for MySQL? The error "Invalid server index" would make me think that there's a phpmyadmin config that is looking for apache, but it's got the improper list / references to point to your apache 2.4 install. I'll be making a follow up video soon for installing MySQL to the webserver as well, so maybe that'll help.
@@FlavorOfTheMonthChannel Thanks for the swift reply, I found the problem in the config file. When I edited it I placed some code before the $i = ++ which I guess was skipping the first couple of variables I added. Cheers
@@IAmScarab Ah ok nice, thanks for following up with the info on how to fix it
After starting the service I am getting an alert saying
"Windows could not start the Apache 2.4 on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service- specific error code 1."
Please help 🙏
How you solve it?
will it autostart when the windows start?
And can it read PHP?
Yep, this service should start when Windows starts up.
It can read PHP, but make sure you follow these steps to get PHP set up:
ua-cam.com/video/VwObm3qvS3Q/v-deo.html
Thanks allot, nice and clear explanation...
How can I get SSL cert on localhost with Apache?
Very nice video. Question, is it possible to install apache in a VM in a local pc and also install django there and server this out to internet, or for more practical purposes to a intranet or network?
In many cases, the server will be virtually hosted on a cloud platform like "digital ocean" to accomplish this. You could put the server with Django on either your local computer, a VM on your local computer, or a VM on a server hosting platform, if desired. Generally speaking, most people/companies host the server on a virtual hosting service that they pay for, so they don't have to deal with any of the hardware issues of running their own server.
The system cannot find the file specificied. No installed service named "Apache2.4". What do I do?
My guess is that you are in the wrong directory.
Use these commands in cmd as admin:
>cd ...
>cd ..
>cd C:\Apache24\bin
@@gjumper9871 i have the same problem still havent been able to fix it im in the right directory
What keyboard are you using and what switches?
Thank you it helped me a lot
super helpful!!
cool stuff really helpful!
Tyvm! glad this helped!
When are you going to make a video on connecting your domain
Thank you! It was helpfull
How to connect apche to web
Hey it says it can't run on local computer
Good tutorial video.
thank you well explained
Thank you
im still waiting on the tutorial for how to get this to the internet
Windows could not start Apache2.4 on Local Computer
Same issues
The httpd.exe file depends on the extract to location being the C: drive. If you have it anyway else you have to edit the directory in the httpd.exe file. Trust me there's too much to edit. Just delete the file and re-extract the zip file to the C: drive. If you've already installed the service as well you'll need to edit the Image path as well. Go to Run, regedit, go to the directoy: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2.4 Once you're there right click Image path and update it to the new directory you unzipped to. Full string should look like this once you're done. "C:\Apache24\bin\httpd.exe" -k runservice Mine worked after that.
@@RolloTompson1231 thank you so much
@@RolloTompson1231 good lookin bro, thank you!
Great video!
it shows code execution cannot be processed!!!
thanks a lot
Hello there. Please could you make a video on how to host .net core app using apache. Thanks in advnace!
THANKS A LOT
ty a lot bro
thnk you
thanks
tysm
Good job
Mine doesn't work. 😅 Always something...
got it!