Limit on number of scripts running simultaneously in a page

(Paul Hodges) #21

I have established through further tests and research that Caddy on Windows cannot provide a robust PHP system. I shall start another thread addressing this specifically.

I have got round my present problems simply by using Apache to run PHP and proxying to it. One site is only PHP and so is proxied in full. The picture gallery required a fudge, because although I could proxy all *.php files, there is no way to test for the existence of an index.php file at a URL without it given explicitly - the fudge is adequate for me, but cannot be generalised.

The relevant parts of my resulting caddyfile look like this:, {
	root ..\\html
# Caddy's fastcgi implementation is not robust on Windows, 
# so we proxy to Apache instead:

# call random image generators as required:
	rewrite /images/QCavi.jpg /proxyphp/images/QCavi.php
	rewrite /images/Firedog.jpg /proxyphp/images/FireDog.php

# this is a fudge to get around not being able to test
# for the existence of index.php at the specified URL:
	rewrite {
		r "(.*)"
		if {file} not_ends_with ".php"
		if {path} starts_with "/images"
		if {file} not_ends_with ".jpg"
		if {file} not_ends_with ".png"
		if {file} not_ends_with ".gif"
		if {file} not_ends_with ".jpeg"
		if {file} not_ends_with ".tif"
	    to /proxyphp/{1}/
	rewrite {
	    r "(.*\.php)"
		to /proxyphp/{1}
	proxy /proxyphp localhost:88 {
	    without /proxyphp

	log .\Logs\CLaccess.log
	errors .\Logs\CLerror.log 

# This site runs in a PHP CMS called Grav., {
	root ..\tetrahedral-audio

	proxy / http://localhost:89

	log .\Logs\TAaccess.log
	errors .\Logs\TAerror.log

I am marking this as solved - as it is for me for now. But it is not a general solution to a real issue.

(Matthew Fay) #22

It’s an unfortunate conclusion, but we very much appreciate the testing you’ve undertaken and the efforts to let us know the results.

(system) #23

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.