how about more configurable options? #56

Closed
adaptunit opened this Issue May 17, 2011 · 3 comments

Comments

Projects
None yet
3 participants

Hi.

I recently discovered YAWS - this is a great server!
but would like more control over the configuration settings, without changing the source code
I talk about hard coded definitions, such as :

-define(FCGI_CONNECT_TIMEOUT_MSECS, 10000).

and

-define(FCGI_READ_TIMEOUT_MSECS, 10000).

and other parameters that could be in the configuration file.
( IndexFile of root directory... etc..)

Thank you for the wonderful software.

Collaborator

vinoski commented May 17, 2011

Thanks. Yes, there are things that could move into config. Many are marked in the source with comments to that effect. But can you provide an actual list of what you think should be added to config? Are the fcgi timeouts and the index file the only two you're looking for?

I am a novice user YAWS.
I had a problem - set up a server for CMS !Joomla.
I decided to use YAWS and FAST-CGI (to increase PHP-script perfomance).

and I had to edit the file "src/yaws_cgi.erl"
because some of PHP-scripts in backend are executed longer than 10 seconds
(upload, XML/XSL server side convertion ... )

FCGI_CONNECT_TIMEOUT_MSECS.
FCGI_READ_TIMEOUT_MSECS

as well as the file "src/yaws_server.erl" because YAWS+FCGI
requires from the server (YAWS) to take "index.fcgi" as an index file for root directory

. . .

try_index_file(DR, GetPath, VirtualDir) ->
FullPath = construct_fullpath(DR, GetPath, VirtualDir),
case prim_file:read_file_info([FullPath, "index.yaws"]) of
{ok, FI} when FI#file_info.type == regular ->
do_url_type(get(sc), GetPath ++ "index.yaws", DR, VirtualDir);
_ ->
case prim_file:read_file_info([FullPath, "index.html"]) of
{ok, FI} when FI#file_info.type == regular ->
do_url_type(get(sc), GetPath ++ "index.html", DR,
VirtualDir);
_ ->
case prim_file:read_file_info([FullPath, "index.php"]) of
{ok, FI} when FI#file_info.type == regular ->
do_url_type(get(sc), GetPath ++ "index.php", DR,
VirtualDir);
_ ->
case prim_file:read_file_info([FullPath, "index.fcgi"]) of
{ok, FI} when FI#file_info.type == regular ->
do_url_type(get(sc), GetPath ++ "index.fcgi", DR,
VirtualDir);
_ ->
noindex
end
end
end
end.

. . .

Of course, if in the future I have any ideas, backed up by practical experience,
I will gladly share with you.

Collaborator

vinoski commented May 17, 2011

Great, this is very useful info. I'll look into it.

vinoski was assigned May 17, 2011

adaptunit closed this May 17, 2011

vinoski reopened this May 18, 2011

etnt closed this Oct 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment