You can create as many folders as you want and drop index. These folders work the same way as any FTP directory, representing the folder and directory structure of a website.
When you are done creating the sample files and directories, refresh the localhost page and you should see the folder and file structure being updated. An example is shown below:. Open your web browser and type in Most wireless routers have a simple setup for port forwarding but in my case, the situation was slightly different.
If your router has a different setting, check out Portforward. Go to whatsmyip. Once you have obtained the external IP of your computer, enter the same in the browser of any computer and your web server should show up.
Caution: Do not ask any random online friend to test your web server. So what we will do now is register a free domain name at www. Once the domain mapping is in place, all you have to do is share the same domain name with your friends or with whoever you want to share the home server and it should work just as fine. Visitors, friends or colleagues who have the address or domain name of your web server can browse through files, download them and use it the same way as they browse any other website on the internet.
If you have questions after reviewing the documentation and any event and error logs , you should consult the peer-supported users' mailing list. This document assumes that you are installing a binary distribution of Apache.
If you want to compile Apache yourself possibly to help with development or tracking down bugs , see Compiling Apache for Microsoft Windows. The primary Windows platform for running Apache 2. Always obtain and install the current service pack to avoid operating system bugs. Individual committers may provide binary packages as a convenience, but it is not a release deliverable.
If you cannot compile the Apache HTTP Server yourself, you can obtain a binary package from numerous binary distributions available on the Internet. Apache is configured by the files in the conf subdirectory.
These are the same files used to configure the Unix version, but there are a few different directives for Apache on Windows. See the directive index for all the available directives. Because Apache for Windows is multithreaded, it does not use a separate process for each request, as Apache can on Unix. Instead there are usually only two Apache processes running: a parent process, and a child which handles the requests.
Within the child process each request is handled by a separate thread. MaxConnectionsPerChild : Like the Unix directive, this controls how many connections a single child process will serve before exiting. However, unlike on Unix, a replacement process is not instantly available. Use the default MaxConnectionsPerChild 0 , unless instructed to change the behavior to overcome a memory leak in third party modules or in-process applications.
ThreadsPerChild : This directive is new. It tells the server how many threads it should use. This is the maximum number of connections the server can handle at once, so be sure to set this number high enough for your site if you get a lot of hits. The recommended default is ThreadsPerChild , but this must be adjusted to reflect the greatest anticipated number of simultaneous connections to accept.
The directives that accept filenames as arguments must use Windows filenames instead of Unix ones. However, because Apache may interpret backslashes as an "escape character" sequence, you should consistently use forward slashes in path names, not backslashes. While filenames are generally case-insensitive on Windows, URLs are still treated internally as case-sensitive before they are mapped to the filesystem. If you wish to assure that only lowercase is used in URLs, you can use something like:.
When running, Apache needs write access only to the logs directory and any configured cache directory tree. Due to the issue of case insensitive and short 8. This means that each directory which Apache evaluates, from the drive root up to the directory leaf, must have read, list and traverse directory permissions. If Apache2. Apache for Windows contains the ability to load modules at runtime, without recompiling the server. To activate these or other modules, the LoadModule directive must be used.
For example, to activate the status module, use the following in addition to the status-activating directives in access. Information on creating loadable modules is also available.
More information is available. When running CGI scripts, the method Apache uses to find the interpreter for the script is configurable using the ScriptInterpreterSource directive. Since it is often difficult to manage files with names like. This mechanism acts as a backup for those situations where Apache is not yet prepared to use the error. Apache comes with a utility called the Apache Service Monitor.
With it you can see and manage the state of all installed Apache services on any machine on your network. To be able to manage an Apache service with the monitor, you have to first install the service either automatically via the installation or manually. You can install Apache as a Windows NT service as follows from the command prompt at the Apache bin subdirectory:. If you need to specify the name of the service you want to install, use the following command. If not, correct any httpd.
The easiest way to start Apache is to add it as a Windows service. Open a new command prompt as administrator , and enter the following:. Create a file named index. If all goes well, your test page should appear.
In general, most problems will be caused by an incorrect setting in the httpd. Refer to the Apache documentation if you require further information.
0コメント