Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

i downloaded the apache haus distribution of the apache server for windows and am trying to set up php, and i see the following lines in the /conf/httpd.conf folder:

# Edit conf/extra/httpd-fcgid.conf to match your php location
# and uncomment the Include line below.
#Include conf/extra/httpd-fcgid.conf

one problem: conf/extra/httpd-fcgid.conf doesn't exist.


is there a copy of the fastcgi config file somewhere, a way to re-write it, or an alternative way to provide php to my webserver?

some chill gamer




core i7 9700f

16gb 2666mhz ram (dual channel)

512gb sandisk sata boot ssd i salvaged from my broken laptop (lenovo doesn't seem to have great quality ideapad laptops)

480gb sata ssd that came with my system

2tb hdd

msi geforce rtx 2060 super

asrock b365m ib-r mobo

logitech g513 rgb keyboard

logitech m720 triathlon wireless mouse

logitech g935 wireless rgb headset

fifine k669b usb mic

some old samsung 1080p60hz monitor (upgrading it soon)

some cheap "rgb" mousepad i got for christmas

and the most important part, real rgb inside the case

Link to post
Share on other sites

Is this for a small local server or large production use?

If it's for a small instance, you could get away with using XAMPP or Wampserver instead, I have used both in production and live environments. Personally I prefer XAMPP. These both offer pre-configured environments with control panels of sorts.


If its for a larger instance, I would recommend  NGINX and  PHP-FastCGI


Link to post
Share on other sites

No, I use php apache module that comes with the version of php you are using. Ie with php7 there will be a file called php7apache2_4.dll


You use the LoadModule directive like so

# path to where php is instlled

# load the php apache module
LoadModule php7_module "${PHPROOT}/php7apache2_4.dll"
# php.ini config file location

# files ending in .php are handled by the php apache module
<FilesMatch "\.php$">
    SetHandler application/x-httpd-php

Note. You have to download apache from apachelounge.com that matches compiled version of php downloaded from windows.php.net

Link to post
Share on other sites

yeah, go with apache from apachelounge , then download php from php website ...


Assuming PHP in unpacked in C:\Programs


Add these to httpd.conf  after the last  loadmodule line


loadModule php7_module c:/programs/php/php7apache2_4.dll
PHPIniDir "C:/Programs/php"

<FilesMatch \.php$>
    SetHandler application/x-httpd-php


Rename php.ini-recommended  or php.ini-development in the php folder, to php.ini and check the php options, enable whatever modules you want (ex mbstring, gd2, mysqli, others) in the ini


Find the directoryindex directive somewhere further down in the conf file and add your php files as higher priority than html files, example :


<IfModule dir_module>
    DirectoryIndex index.php default.php index.html index.htm



It's optional but I highly suggest it ... uncomment  the mod_rewrite  and vhost_alias modules at the top  and then down at the bottom , uncomment to include the vhosts.conf file


# Virtual hosts
Include conf/extra/httpd-vhosts.conf

and create a vhost for your website ... you can make up a fake domain and then add the fake domain in the etc/host file ( c:\Windows\System32\drivers\etc\hosts  in windows )


I add something like this to the hosts file	dev.myactualdomain.com


and in the httpd-vhosts.conf  I can now define my custom website


# IP and Port ... must be in httpd.conf with a Listen command 
    # eh, any email, i guess you could remove this completely	
    ServerAdmin bla@example.com
    # v files for this vhost are served from here
    DocumentRoot "C:/WEBSITE_FOLDER"
    ServerName dev.myactualdomain.com
    # v this is often used for www. ex ServerName is domain.com , ServerAlias can be www.domain.com 
    #   and this vhost will react to both versions
    # ServerAlias dev.myactualdomain.com
    ErrorLog "logs/dev-error.log"
    CustomLog "logs/dev-access.log" common
	<Directory "C:/WEBSITE_FOLDER">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted



Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now