You can run apache in two different ways.
As a Windows Service
Installing apache as a windows service:
Open the command prompt and navigate to the bin directory.
Enter the following command
httpd -k install -n “service name”
Uninstalling apache as windows service:
Open the command prompt and navigate to the bin directory.
Enter the following command
httpd -k uninstall -n “service name”
Starting apache:
Open the command prompt and navigate to the bin directory.
Enter the following command
httpd -n “service name” start
Open the command prompt and navigate to the bin directory.
Enter the following command
httpd -n “service name” restart
Stopping apache:
Open the command prompt and navigate to the bin directory.
Enter the following command
httpd -n “service name” shutdown
As a normal process:
Open the command prompt and navigate to the bin directory.
Enter the following command
httpd
As a Windows Service
Installing apache as a windows service:
Open the command prompt and navigate to the bin directory.
Enter the following command
httpd -k install -n “service name”
Open the command prompt and navigate to the bin directory.
Enter the following command
httpd -k uninstall -n “service name”
Starting apache:
Open the command prompt and navigate to the bin directory.
Enter the following command
httpd -n “service name” start
Restarting apache:
Open the command prompt and navigate to the bin directory.
Enter the following command
httpd -n “service name” restart
Stopping apache:
Open the command prompt and navigate to the bin directory.
Enter the following command
httpd -n “service name” shutdown
As a normal process:
Open the command prompt and navigate to the bin directory.
Enter the following command
httpd
You will not see any message notifying that the server has started.
Access the following using your favorite browser
http://localhost
You should see the following.
Click ctrl+c in the command prompt to stop the server.
0 comments:
Post a Comment