Install apache xp
Then change to the logs folder, and review the error. When working with Apache it is important to know how it will find the configuration file. You can specify a configuration file on the command line in two ways:.
In both of these cases, the proper ServerRoot should be set in the configuration file. This built-in path is relative to the installation directory.
Apache will then try to determine its ServerRoot by trying the following, in this order:. If you did not do a binary install, Apache will in some scenarios complain about the missing registry key. This warning can be ignored if the server was otherwise able to find its configuration file. The value of this key is the ServerRoot directory which contains the conf subdirectory.
When Apache starts it reads the httpd. If this file contains a ServerRoot directive which contains a different directory from the one obtained from the registry key above, Apache will forget the registry key and use the directory from the configuration file.
If you copy the Apache directory or configuration files to a new location it is vital that you update the ServerRoot directive in the httpd. After starting Apache either in a console window or as a service it will be listening on port 80 unless you changed the Listen directive in the configuration files or installed Apache only for the current user. To connect to the server and access the default page, launch a browser and enter this URL:. Apache should respond with a welcome page and you should see "It Works!
If nothing happens or you get an error, look in the error. If you happen to be running Apache on an alternate port, you need to explicitly put that in the URL:. Once your basic installation is working, you should configure it properly by editing the files in the conf subdirectory. Again, if you change the configuration of the Windows NT service for Apache, first attempt to start it from the command line to make sure that the service starts with no errors.
These conflicting services include other WWW servers, some firewall implementations, and even some client applications such as Skype which will use port 80 to attempt to bypass firewall issues. Mapped drive letters allow the administrator to maintain the mapping to a specific machine and path outside of the Apache httpd configuration.
However, these mappings are associated only with interactive sessions and are not directly available to Apache httpd when it is started as a service. Use only UNC paths for network resources in httpd. Arcane and error prone procedures may work around the restriction on mapped drive letters, but this is not recommended. When running Apache httpd as a service, you must create a separate account in order to access network resources, as described above. If more than a few dozen piped loggers are used on an operating system instance, scaling up the "desktop heap" is often necessary.
For more detailed information, refer to the piped logging documentation. Copyright The Apache Software Foundation. Licensed under the Apache License, Version 2. Customizing Apache for Windows Apache is configured by the files in the conf subdirectory. In this case, serve the index. DirectoryIndex: sets the file that Apache will serve if a directory. DirectoryIndex index. The following is the setting for the script parser that needs to run.
In this example it is Perl script. Apache parses all CGI scripts for the shebang line by default. This comment line, the first line of the script, consists of the symbols. For a perl script, with perl. Of course, CGI processing must be enabled by. The following is the customization of the standard web error handling. We can point to a custom error pages, run a script or just to display a text messages.
Customizable error responses come in three flavors:. Some examples:. ErrorDocument "The server made a boo boo. There are many more configurations that you can customize it.
Please read the documentation at Apache. You can open the access and error log files for debugging if something wrong with your Apache activities. The following Figures show the access and error logs file contents respectively. Other Java tutorials at javaguicodexample. The machine specifications used to complete this task: Intel Pentium Core 2 Duo, 2. Download and unzip the package into your. Or you can install it manually which obviously requires a greater comfort with your platform but provides more flexibility with the installation details.
For the build scripts to work you need to set the Environment Variables. The environment properties file contains the environment variables which point to the locations of the dependencies you will use throughout the process. These are used by the various build scripts to run and compile the SDK.
You will add additional environment variables through out the rest of this tutorial. When you run the build script later the script will validate the paths provided and warn you if they are incorrect. I use the same domain name as the real site with lc. An example configuration might be comments on top not included for brevity :. Note that everything after the character is regarded as a comment.
You can use this to add useful comments. The IP address, If you want to use the web server in a local network, you have to use an IP address that can be contacted by other computers in the network.
Also, you either have to modify all hosts files on each and every computer, or set up a name server. Add the following line to the end of the httpd. Since the ServerRoot in the default install is set to the folder that contains the conf folder we can use the short relative notation as given above.
Note: where filenames are specified, you must use forward slashes instead of backslashes e. After changes have been made to the httpd. If you are logged in with Administrator rights the easiest way to do this is by using the Apache monitor which is started when you log in and available via the system tray. Click the right mouse context menu button on the red feather icon in the system tray and select the Open Apache Monitor menu entry.
Note that during installation of the Apache web server a short cut to the Apache service monitor is created in the Startup folder of "All Users" i. Users with limited access rights are not able to control the Apache service but will get the Apache monitor running in their system tray anyway. You might want to move the short cut to the Startup folder of a user with Administrator rights.
Note that this only works if the command prompt has Administrator rights. As a limited user open the "Accessories" of the "All Programs" menu in the Start menu. Place the mouse pointer on top of the Command Prompt entry, press the right context menu mouse button, and select the "Run As In the "Run as" dialog window switch to "The following user" and select a user with Administrator rights from the drop down menu and enter the password for the selected user.
In a similar manner a user with limited rights can run ApacheMonitor. However, most of the time switching to an account with Administrator rights is more convenient. If the Apache web server can't be started after a change to a configuration file, open a command prompt you don't need Administrator rights , change the working directory to the Apache bin directory, and run apache.
In the above case I made on purpose a spelling mistake in the virtual-hosts. Fix the problem reported, and run apache. If the program reports that the syntax is ok:. Tip : you might want to study some of the other apache. Use apache -h to get an overview. For example the option -S shows the virtual host settings, see the next section. After adding the Include directive to Apache's httpd. Note that if you add new ones you have to update the hosts file as well.
0コメント