Advice 1: How to know the version of apache

Today Apache is the most popular and widely used HTTP-server in the world. In most cases, applied a version of line 2.x this product. Their functionality isn't much different. Sometimes, however, still need to know the version of apache running on a specific machine.
How to know the version of apache
You will need
  • browser;
  • - SSH-client or physical access flap with apache;
  • - access to the target machine via HTTP.
Instruction
1
Start preparing to learn the version of apache by running its executable. If the server is on the local machine, load the shell, terminal emulator or switch to a text console. When you work in operating systems of family of Windows, click the start button in the taskbar, click Run, type cmd, and click OK. In Linux-like systems press Alt+F1-Alt+F12 or Ctrl+Alt+F1 - Ctrl+Alt+F12 to implement a console log or run a terminal emulator such as Konsole, XTerm, etc. If the apache version which you want to see installed on the remote computer, connect to it via ssh. Use PuTTY under Windows and the console ssh client in Linux-like systems.
2
Find out the version of apache by running the server module with the option-v or -V. In the first case you will see only information about the version and date of the Assembly, in the second it will have added additional data (description of the architecture, the list of preprocessor directives are used at compilation, etc.). Executable module for apache is named httpd or httpd2 depending on which product line it belongs (1.x or 2.x). Today is rare to find apache version 1.x. Thus, to know its version normally by running the console command:httpd2 -vЕсли executable file httpd2 is not, specify the full path to it.
3
Try to find out the version of apache using the phpinfo function call from a script, written in php and running under server control. Create a file server script with the following content:<?php phpinfo();?>Place it in one of the directories served by the server and accessible through HTTP. Start apache if necessary. Open the address corresponding to the script in the browser window. If the server is configured to work with PHP using the function phpinfo is not prohibited in the php configuration file.ini, the browser displays the HTML document. Locate the section apache2handler. Find out the version of the server.
4
Try to find out the version of apache from the information given on the error page. To do this, open a browser to the URL, addressing the machine where you installed the server by its IP address and adding the name of a nonexistent document. Likely will display a standard 404 error page of apache. It is likely you will see the version of the server.

Advice 2: How to restart apache

The most popular and feature rich HTTP server today is Apache. It is very stable and capable of continuously operating for long years. However, update configuration settings, such as modifying the list of virtual hosts, you must restart Apache.
How to restart apache
You will need
  • - root access on the target machine;
  • - SSH-client.
Instruction
1
Log on the local machine or connect to a remote server running Apache, and also authorize. If you have physical access to the machine on which the server functions that require a reboot, and connected the monitor with the keyboard, the authorization process will not be a problem.

If the target machine has only remote SSH access, use the program customers to implement connectivity. Under Windows you can use the freely distributed graphical client PuTTY is available for download on the website putty.nl. In Linux-like systems switch to a text console, or run a terminal emulator and then run the command:
ssh username@serveraddress

After connect enter the password.
How to restart apache
2
Start a session as root. Run the command su. Enter the root password.
How to restart apache
3
Determine which of the server Apache is running on the target machine. Run the command:
service httpd status

The message httpd is running will attest to the fact that Apache operates in version 1.x. Message service: httpd: Unrecognized service indicates that this service is not installed. The inscription httpd is stopped says that the server is installed but not running.

Likewise, check whether you are running Apache version 2.x. Run the command:
service httpd2 status

Upon inspection, will reveal the presence or absence of the services httpd and httpd2. They (including simultaneously) can be started and stopped. If the target machine is functioning Apache, go to the next step.
How to restart apache
4
Restart Apache. To restart the server by stopping it and then running, run the command:
service ServiceName restart
As the name of a service, specify httpd or httpd2 depending on the results obtained in the previous step. For the implementation of a "soft" reboot with the updated configuration instead of restart, use the graceful. For example:
service httpd2 graceful
This method is more preferable.
How to restart apache
5
Shut down. Close the session to the root user, perform the exit command. Disconnect from the server using the command exit or logout.
How to restart apache
Is the advice useful?
Search