Stopping Apache Httpd Web Server Apache2



  1. Stopping Apache Httpd Web Server Apache2
  2. Apache Httpd
  3. Httpd Server
  4. How To Stop Apache2 Server

Adobe Media Server includes Apache HTTP Server. If you install and enable the web server, you can deliver client SWF files, container HTML pages, and media assets from Adobe Media Server. You can serve content over HTTP, as well as RTMP. In addition, you can serve video over HTTP progressive download as a fallback solution for web proxies that break RTMP or RTMPT.

The Adobe Media Server installation of Apache is like the standard installation. You can use Apache documentation for most configuration tasks. The Apache root installation folder is rootinstall/Apache2.4. The web root is rootinstall/webroot.

Note:

The Adobe Media Server documentation uses “rootinstall” toindicate the Adobe Media Server root installation folder (C:ProgramFilesAdobeAdobe Media Server 4 by default on Windows). The Apachedocumentation and configuration files use “ServerRoot” to indicatethe Apache root installation folder.

The default is /usr/local/apache2.-f config Uses the directives in the file config on startup. If config does not begin with a /, then it is taken to be a path relative to the ServerRoot. The default is conf/httpd.conf.-k start restart graceful stop graceful-stop Signals httpd to start, restart, or stop. See Stopping Apache httpd for more. I am using Apache 2.2 on 12.04. I have activated ssl connection with a self-signed certificate which works fine, but now I'd like to disable any non-ssl connection. I used a2dissite default but the server is still accessible on port 80 even after restarting the server. Please help me on this. Log rotation is another possible reason, though usually logrotate will restart the Apache process after it's done. Speaking of logrotate, do you find that your service tends to stop on any particular day of the week? Logrotate runs once per week, and it's possible the HUP it sends your httpd process is not restarting it.

The Apache serverthat installs with Adobe Media Server differs from a standard Apacheinstallation in the following ways:

  • The apachectl files are in the rootinstall/Apache2.4/manual/programs folder.

  • The httpd.conf file and the standard secondary configuration files are in the rootinstall/Apache2.4/conf folder.

  • The log files are in the rootinstall/Apache2.4/logs folder. For more information, see Monitoring and Managing Log Files.

To do any of the following, edit the rootinstall/Apache2.4/conf/httpd.conf file:

  • Handle multiple adaptors or virtual hosts

  • Block sensitive file types, such as ASC

  • Handle any non-standard MIME types required for progressivedownload

  • Serve the default server-status and server-info pages

  • Modify source directories

In the Adobe Media Server Adaptor.xml file, the MaxHeaderLineLength elementdetermines the size of the HTTP header the server can handle. The defaultvalue for MaxHeaderLineLength is 1024 bytes. Somebrowsers send a header larger than 1024 bytes. In this scenario,Apache sends back an empty response. To fix this issue, configure MaxHeaderLineLength to8192.

Note:

By default, the Apache HTTP header size limit is 8 KB (8190bytes plus a carriage return).

  1. Open rootinstall/conf/Adaptor.xml in a text editor.

When you install Adobe Media Server and choose to installApache, it is enabled by default. Adobe Media Server listens onport 80 and proxies HTTP requests to Apache over port 8134.

Setting the parameter to no value disables HTTP proxying:

To proxy to a remote server, set the parameter to the remoteserver you want to use:

  1. Add port 80 to the ADAPTOR.HOSTPORT tag.

    ADAPTOR.HOSTPORT = :1935, 80

  2. To start and stop Apache when Adobe Media Server starts andstops, set the SERVER.HTTPD_ENABLED parameter to true:

    • Open rootinstall/conf/ams.iniand set the value of the HTTPPROXY.HOST variableto 8134:

      HTTPPROXY.HOST = :8134
    • Open the Adaptor.xml configuration file in a text editor.

      Ifyou have multiple adaptors, open the file for the adaptor you wantto configure. The default Adaptor.xml file is located in the rootinstallconf_defaultRoot_folder.

      Set the enable attribute of the HttpProxy tagto 'true', as in the following:

      <HttpProxy enable='true' maxbuf='16384'> <Host port='80'>${HTTPPROXY.HOST}</Host> </HttpProxy>

      Save and validate the Adaptor.xmlfile.

  1. Remove port 80 from the ADAPTOR.HOSTPORT tag.

    ADAPTOR.HOSTPORT = :1935

    • Open rootinstall/conf/ams.iniand set the value of the HTTPPROXY.HOST variableto no value:

      HTTPPROXY.HOST =
    • Open the Adaptor.xml configuration file in a text editor.

      Ifyou have multiple adaptors, open the file for the adaptor you wantto configure. The default Adaptor.xml file is located in the rootinstallconf_defaultRoot_folder.

      Set the enable attribute of the HttpProxy tagto 'false', as in the following:

      <HttpProxy enable='false' maxbuf='16384'> <Host port='80'>${HTTPPROXY.HOST}</Host> </HttpProxy>

      Save and validate the Adaptor.xmlfile.

Apachecan deliver SWF files, HTML files, JPG files, and many other standardfile types over HTTP. Place files that you want to deliver overHTTP in the correct folders. By default, Apache is configured touse following paths:

Path

Location

Example URL

/

rootinstall/Apache2.4/webroot

http://myAMSServer.com/app.swf

/cgi-bin

rootinstall/Apache2.4/cgi-bin

http://myAMSServer.com/cgi-bin/someScript.pl

These folders are global, not application-specific. Any SWF filesand HTML files you want to serve over HTTP must be in these foldersor in application-specific folders. To create aliases for application-specificfolders, edit the httpd.conf file.

Stopping Apache Httpd Web Server Apache2

To have Apache serve content over HTTP, either use one of the predefined web directories or create a web directory for that application. To create a web directory for an application, add an alias to the rootinstall/Apache2.4/conf/httpd.conf file. For example, the following lines create an alias that points to the streams directory of an application called “hd”:

Copy media files to the rootinstall/applications/hd/streams/_definst_/folder to serve them over HTTP. For example, if a client requests http://ams.example.com/hd/someVideo.flv,Apache serves it the someVideo.flv file from the rootinstall/applications/hd/streams/_definst_/folder.

For more information about editing the configuration file, seethe Apache documentation at www.apache.org.

You can configure the web server to act as a WebDAV host. For information, see the Apache HTTP Server version 2.4 documentation at www.apache.org.

The following keywords are reserved words: open, close, send, idle, fcs, ams, crossdomain.xml, fpad. Reserved words cannot be used for directory names under the webroot directory or for anything else. If you have applications with these names, use custom aliases to give the HTTP virtual directories slightly different names from the RTMP applications, such as “open_”.

  1. Change directories to the rootinstall/Apache2.4/bin folder. For example, at the command prompt, enter the following:

  2. To install Apache to run as a service, enter the following:

    Note:

    Touninstall Apache, enter the following: httpd.exe -n AMSHttpd-k uninstall.

  3. To verify that Apache is running, open the Windows Servicespanel and locate the AMSHttpd service.

To start and stop the Windows services on Windows XP:

Stopping Apache Httpd Web Server Apache2

  1. Right click My Computer and select Manage. The Computer Management dialogbox displays.

  2. Select Services and Applications.

  3. Double-click Services. The list of available services displays.

  4. To start a service, select the service from the list andclick the Start Service button. To stop a service, select the servicefrom the list and click the Stop Service button.

At some time after installing Adobe Media Server, you might be required to update the included Apache web server. Most commonly, this would be due to Apache HTTP server security patches or functionality upgrades.

The recommended approach to upgrading the Apache web server is to install or build the Apache server in a directory that is separate from the existing server. Then copy the contents of newly-installed directories to the existing server.

In most cases, you do not replace the existing Apache configuration files with the newer versions of these files. This is because the Apache web server installation for Adobe Media Server is pre-configured with specific modules and settings. If there are changes to the configuration files, it is usually easier to update the existing files with changes.

Before upgrading:

  1. Review any installation notes on apache.org about the differences between the current version and the new version. For example, look for renamed directives or renamed modules that would require you to merge configuration files.

  2. Make sure the currently-installed version of Apache is working correctly:

    1. Check the master log file for errors. The master.00.log file should have a line that launches the httpd process and returns 0; for example: - C:Program FilesAdobeAdobe Media Server 5Apache2.4binhttpd -f ./conf/httpd.conf -d 'C:Program FilesAdobeAdobe Media Server 5Apache2.4' -n AMSHttpd -k start returned 0:

    2. Try playing videos using the “http” protocol.

  3. Check the current version of Apache and make a note of it. From a command prompt, go to AMS_Install_Dir/Apache2.4/bin and issue the following command:httpd -v

  4. Back up following directories:AMS_Install_Dir/Apache2.4/bin AMS_Install_Dir/Apache2.4/lib AMS_Install_Dir/Apache2.4/include AMS_Install_Dir/Apache2.4/modules AMS_Install_Dir/Apache2.4/manual AMS_Install_Dir/Apache2.4/icons

To upgrade:

  1. Stop Adobe Media Server.

  2. Follow the directions on apache.org to download and run the Apache installer. If you are using Linux, you may be required to build the Apache server on your system.

  3. Copy the following directories from the newly-installed version to the current version that was installed with Adobe Media Server:Apache_Install_Dir/bin Apache_Install_Dir/modules Apache_Install_Dir/manual Apache_Install_Dir/icons

    Note that the /conf directory, which contains the Apache configuration files, is not included in this list. You should not replace the existing configuration files with the new configuration files.

  4. Merge the configuration files, if necessary. In most cases, you will not need to merge the files. However, if the newer version of Apache includes new or renamed modules or directives, you might need to edit the configuration files to meet the new requirements.

  5. Start Adobe Media Server.

After upgrading:

  1. Ensure that the newer version of Apache is now available. From a command prompt, go to AMS_Install_Dir/Apache2.4/bin and issue the following command:httpd -v

  2. Recompile third-party modules, if necessary.

  3. Make sure the newly-updated version of Apache is working correctly:

    1. Check the master log file for errors or warnings. The master.00.log file should have a line that launches the httpd process and returns 0; for example: - C:Program FilesAdobeAdobe Media Server 4Apache2.4binhttpd -f ./conf/httpd.conf -d 'C:Program FilesAdobeAdobe Media Media Server 4Apache2.4' -n AMSHttpd -k start returned 0:

    2. Try playing videos using the “http” protocol.

Updating the OpenSSL version in the bundled Apache server

On a Window Machine, OpenSSL is available with bundled Apache. To update the OpenSSL version, follow these steps:

Stopping Apache Httpd Web Server Apache2
  1. Access the bin directory of your Apache installation.

  2. Copy libeay32.dll, ssleay32.dll, and openssl.exe files from a separate, patched security release of OpenSSL from the same major release.

  3. Replace the existing files with the new files in the bin directory.

On Linux machines, the bundled Apache does not include the OpenSSL libraries libcrypto and libssl. Adobe recommends that the administrators keep the system updated with the appropriate version of OpenSSL binaries.

In some cases, the Apache server could be at fault for the Adobe Media Server not running properly. This is sometimes caused by syntax errors in the Apache configuration files.

Apache Httpd

Check the master.log file in the rootinstall/logs directory. If Apache could not start for some reason, it typically returns an error code of “1” and writes a line similar to the following in the master.log file:2010-06-22 15:45:09 4276 (w)2581414 C:Program FilesAdobeAdobe Media Server 5Apache2.4binhttpd -f ./conf/httpd.conf -d 'C:Program FilesAdobeAdobe Media Server 5Apache2.4' -n AMSHttpd -k start returned 1:

The status of (w) or (e) indicates a warning or error. For more information about status codes in the master.log file, see Diagnostic logs.

If you are running Adobe Media Server as a service, you can check the Windows Event Viewer for errors messages. On Linux, check syslog’s log file for error messages.

You can also check the Apache log files for error messages. The default location of the Apache log files is rootinstall/Apache2.4/logs. The logs are in the default Apache error and combined access log formats. For information about these log file formats, see Log Files.

Httpd Server

To change the location of the log files, edit the rootinstall/Apache2.4/conf/httpd.conf file.

How To Stop Apache2 Server

More like this