首页 技术 正文
技术 2022年11月14日
0 收藏 376 点赞 4,851 浏览 2237 个字

      Note

      Those of you interested in the Apache 2.0.X tutorial, it has been abandon and I will no longer keep it updated, but it can be found here.

    Apache 2.2.X

    1. Download & Unpack

      Go to http://www.apache.org/dist/httpd/binaries/win32/ and choose a mirror. You want the latest win32-x86-no_ssl.msi “MSI Installer Package” release.

      My file was named: httpd-2.2.21-win32-x86-no_ssl.msi

      NOTE about finding the download links
      Apache sometimes moves the “quick download” link to the win32 binary. The long way to officially find it is Download > Other files > binaries folder (not the “Binary Releases” info link at the top) > win32 folder > then the latest win32-x86-no_ssl.msi release
    2. Install

      When you install Apache, you’ll get a prompt for “Server Information.” Here is the settings I used:

      Network Domain: localhost
      Server Name: localhost
      Admin Email: (any email. real or fake)[checked]: for All Users, on Port 80, as a Service
    3. Starting/Stopping Apache

      After installation Apache2 will automatically start. The How to install Apache Server on Windows icon in the System Tray means it started. The How to install Apache Server on Windowsicon means the “Monitor Apache Servers” is running, but Apache2 isn’t started.

      You can easily start/stop/restart Apache and Apache2 via that icon in your System Tray. If you get “The requested operation has failed!” error while starting apache use the “Test Configuration” shortcut in the Start Menu to find the error (if the text window pops up then closes before you can read it, your config file is fine).

    4. Testing

      Now the ultimate test. To see if it’s serving. Open your browser and head to: http://127.0.0.1/ orhttp://localhost/

      If it shows the It works! you have your server software installed and running.

    5. Making Apache point to your files

      Using Notepad open C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf (in the start-menu there should also be a “Apache HTTP Server 2.2 > Configure Apache Server > Edit the Apache httpd.conf Configuration File” shortcut) and search for DocumentRoot. Change it from something likeDocumentRoot “C:/Program Files/Apache Software Foundation/Apache2.2/htdocs” to the location where your HTML files and site are located. In my case: DocumentRoot “C:/public_html”

      NOTE
      The first time i installed Apache2, i accidentally changed ServerRoot. Make sure you change the correct line which is DocumentRoot and which is down about line 175.

      Then scroll down about one page and change: <Directory “C:/Program Files/Apache Software Foundation/Apache2.2/htdocs”> to point to the same location you set DocumentRoot to in the last step.

      Restart apache to make the changes take effect

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,085
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,560
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,409
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,182
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,819
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,902