简体   繁体   中英

Where is the httpd.conf file?

I had downloaded Apache Tomcat for developing Java Servelets, then I thought of using PHP also, I referred this for help on setting up Apache Server for PHP, and it says:

To configure Apache to run PHP, the httpd.conf file needs to be modified. This file is located in the apache installation directory under the conf folder. Open the httpd.conf file in EditRocket and do the following:

A. Add the following line after all of the LoadModule statements:

LoadModule php5_module "c:/php/php5apache2_2.dll"

B. Search for AddType, and add the following after the last AddType line:

AddType application/x-httpd-php .php

C. Add the PHP location to the end of the httpd.conf file. For example, at the end of the file, add the following:

PHPIniDir "c:/php"

I looked under the C:\\apache-tomcat-7.0.4\\conf , but there is no file as httpd.conf. Is there any other version which I'll have to download? Or can Tomcat run it with some plugin or something?

According to Apache Tomcat Howto , Tomcat is not capable of running PHP as it is designed only for JSP and static. Further reading shows that in order to provide your hosting for JSP, you need to install Apache webserver, and then install a web server adapter, and then modify Tomcat XML.

  1. Modify Apache's httpd.conf file.
  2. Install a web server adapter.
  3. Modify Tomcat's server.xml file.

The link is old, but there are other references, and most of them will tell you to install mod_proxy in apache and send it to tomcat for your jsp app portion.

I would suggest further reading at the documentation for how to make it work, as I don't have first hand experience with it for a full explanation. Also look here for better information on how to forward apache requests to your tomcat apps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM