httpd, mod_fcgid, Wt-3.3.5, browser refresh
Added by Mohamed Samir about 9 years ago
Hi,
I have created and deployed a website using Wt, httpd and mod_fcgid and everything works as expected except one thing.
the website base url is called www.mywebsite.com and I have different pages in the website which I navigate through using
WMenuItems->setLink(Wt::WLink::InternalPath, "url")
also I listen and react to internalPathChange() signal as usual
now when I click on one of those links say "Home" the path changes to "www.mywebsite.com/Home" and again everything works
problem is, when I click the "refresh" button from the browser or press F5 I get "The requested URL /Home was not found on this server."
I looked at apache "error_log" file located in "var/log/httpd" and found that no errors were printed regarding this and it seems to me
that the fcgi does not even get the request when I refresh the page and this happens to all the links when I refresh the page.
here is my config files:
wt.conf (located in /etc/httpd/conf.d)
<IfModule mod_fcgid.c>
NameVirtualHost *:80
# [+] For debugging.
#FcgidMaxProcesses 2
# [-] For debugging.
<VirtualHost *:80>
# Add this servername into the /etc/hosts file.
ServerName www.mywebsite.com
ServerAlias mywebsite.com
DocumentRoot /var/www/mywebsite/docroot
AddHandler fcgid-script wt
DirectoryIndex mywebsite.wt
Order Deny,Allow
Allow from all
Options +ExecCGI -Indexes
Require all granted
FcgidInitialEnv WT_APP_ROOT /var/www/mywebsite/approot/
# [+] For debugging.
# Increase timeout of application process for debugging.
#FcgidIOTimeout 300
#FcgidConnectTimeout 300
# Reduce the number of processes spawned to 1 so that it is easy for debugging.
#FcgidMaxProcessesPerClass 1
#FcgidMinProcessesPerClass 1
# [-] For debugging.
Software info:
Linux_Fedora_22-x86_64
GCC 5.1.1
Google Chrome 45.0.2454.99 (64-bit)
Wt 3.5.5 built from git on 26-10-2015
Replies (1)
RE: httpd, mod_fcgid, Wt-3.3.5, browser refresh - Added by Mohamed Samir about 9 years ago
I managed to solve the problem by adding aliases to wt.conf file for all my internal paths
and now my file looks like this:
<IfModule mod_fcgid.c>
NameVirtualHost *:80 # [+] For debugging.
#FcgidMaxProcesses 2 # [-] For debugging.
<VirtualHost *:80> # Add this servername into the /etc/hosts file.
ServerName www.mywebsite.com
ServerAlias mywebsite.com
DocumentRoot /var/www/mywebsite/docroot
AddHandler fcgid-script wt
Alias "/Home" "/var/www/UranusInteractive/docroot/mywebsite.wt/Home"
DirectoryIndex mywebsite.wt
Order Deny,Allow
Allow from all
Options +ExecCGI -Indexes
Require all granted
FcgidInitialEnv WT_APP_ROOT /var/www/mywebsite/approot/
[+] For debugging.
Increase timeout of application process for debugging.
#FcgidIOTimeout 300
#FcgidConnectTimeout 300
Reduce the number of processes spawned to 1 so that it is easy for debugging.
#FcgidMaxProcessesPerClass 1
#FcgidMinProcessesPerClass 1
[-] For debugging.