WeBWorK Main Forum

requests for assets from pg_files return error code 404

requests for assets from pg_files return error code 404

by Tural Hamzayev -
Number of replies: 4

Hello and Thank you for the great tool,

After upgrade to WW 2.17 all requests for js/css files in folder pg_files return with error code 404.

Folder permissions allow reading.
I've added this line to apache configuration file : push @Alias, [ "/pg_files" => "$pg_dir/htdocs" ];
All files requested exist in /opt/webwork/pg/htdocs/js/apps/ folder.

In reply to Tural Hamzayev

Re: requests for assets from pg_files return error code 404

by Glenn Rice -
You do not need to add the alias to your apache configuration file in that way. I suspect that you need to check that your copy of the /opt/webwork2/conf/webwork.apache2.4.config.dist file is updated with the 2.17 changes.
In reply to Glenn Rice

Re: requests for assets from pg_files return error code 404

by Andras Balogh -

I also have these lines in the site.conf file:

$webwork_url       = '/webwork2';
$webwork_htdocs_url  = "/webwork2_files";
$webwork_htdocs_dir  = "$webwork_dir/htdocs";

with webwork.apache2.4-config containing
$webwork_dir = "/opt/webwork/webwork2";

and the htdocs/js/apps/ folder is under /opt/webwork/webwork2

In reply to Andras Balogh

Re: requests for assets from pg_files return error code 404

by Glenn Rice -
Note that for webwork 2.17 there is also a htdocs/js/apps folder in /opt/webwork/pg.
In reply to Glenn Rice

Re: requests for assets from pg_files return error code 404

by Tural Hamzayev -

That was it.

I replaced apache config file and it worked.

Thank you!!