Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self/Manual Defined Virtual Host not working #899

Open
adods opened this issue Oct 29, 2024 · 0 comments
Open

Self/Manual Defined Virtual Host not working #899

adods opened this issue Oct 29, 2024 · 0 comments

Comments

@adods
Copy link

adods commented Oct 29, 2024

I created this virtual host manually. to have different virtual host handled by different php version (PHP 8.2 is the default set on my Laragon), but when accessed from the browser it's always return "Unable to Connect", while other "Auto" virtual hosts work properly. And I already add the host to the hosts file. Below is my vhost file:

define ROOTDIR "D:/Data/Works/Products/oldApp/public_html"
define SITE "scv15.test"
define PHP74PATH "C:/laragon/bin/php/php-7.4.33-nts-Win32-vc15-x64"

LoadModule fcgid_module "C:/laragon/etc/apache2/modules/mod_fcgid-2.3.9-win64-VC15.so"

<IfModule fcgid_module>
	FcgidInitialEnv PATH "${PHP74PATH};C:/Windows/system32;C:/Windows;C:/Windows/System32/Wbem;"
	FcgidInitialEnv SystemRoot "C:/Windows"
	FcgidInitialEnv SystemDrive "C:"
	FcgidInitialEnv TEMP "C:/Windows/Temp"
	FcgidInitialEnv TMP "C:/Windows/Temp"
	FcgidInitialEnv windir "C:/Windows"

	# 10 hrs: in case you have long running scripts, increase FcgidIOTimeout 
	FcgidIOTimeout 36000
	FcgidConnectTimeout 16
	FcgidMaxRequestsPerProcess 0
	FcgidMaxProcesses 50
	FcgidMaxRequestLen 81310720
	# Location php.ini:
	FcgidInitialEnv PHPRC "${PHP74PATH}"
	FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 0
</IfModule>

<VirtualHost *:80> 
    DocumentRoot "${ROOTDIR}"
    ServerName ${SITE}
    ServerAlias *.${SITE}
    <Directory "${ROOTDIR}">
        AllowOverride All
        Require all granted
    </Directory>
	<Files ~ "\.php$>"
		SetHandler fcgid-script
		Options +ExecCGI
		FcgidWrapper "${PHP74PATH}/php-cgi.exe" .php
	</Files>
</VirtualHost>

When checked the syntax using httpd -t, it's valid. And the virtual host listed on httpd -S. Did I miss something?

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant