I tried to install web apps on my server, there was impression from the developer that my apache rewrite module is not function, while I can verify that the module (rewrite) is enable in the webmin.
the pat supposed to
Actually, all request made to apps, are request made to the “index.php”
file. the web_apps trusts the apache rewriting system to transform any
“/<apps_path>” to “/index.php/<apps_path>”.
Actually, all request made to apps, are request made to the “index.php”
file. web apps trusts the apache rewriting system to transform any
“/<apps_path>” to “/index.php/<apps_path>”.
The mod_rewrite module should be available in Apache by default – and that’s something your developer should be able to make use of from a .htaccess file.
Are they getting an error of some kind? If so, what error are they getting?
If I manually force to use url www.domain.com/index.php/apps
I managed to get the login screen, after submitting the proper login screen and password
It went to www.domain.com/apps
and it gave me this error…
The requested URL /login was not found on this server.
According to the developer it should www.domain.com/index.php/apps
as they mentioned that all request made to webapps, are request made to the "index.php
**updates
I tried to set the the AllowOveyride to All DocumentRoot /var/www
Options FollowSymLinks
AllowOverride All
And create my own .htaccess to rewrite the url…
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|.php|.html|.htm|.feed|.pdf|.raw|/[^.])$ [NC]
RewriteRule (.) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
Well, there’s nothing in that which tells it to redirect to the URL you’re seeing – that may mean it’s the application itself doing that, not mod_rewrite.
Also, note that for mod_rewrite to work, each VirtualHost block in the Apache config that needs to use mod_rewrite needs to have “Allowoverride None” set.
And if you’re seeing 500 errors – you can look in $HOME/logs/error_log to see what the problem is, the details of the error you saw should be listed in there.
[Mon Oct 17 08:04:09 2011] [error] [client 110.139.177.53] Premature end of script headers: php5.cgi, referer: http://domain.com/
Then when I tried to force access link
http://domain.com/index.php/login
And below the logs from apache
[Mon Oct 17 08:07:19 2011] [error] [client 110.139.177.53] Premature end of script headers: php5.cgi, referer: http://domain.com/index.php/login
Can you please give me advice, if there something that I need to changes on this line… this one was automatically generated by Virtualmin. Thanks a lot…
Well, as I mentioned – I think the issue is with your application, rather than with mod_rewrite (or your Apache config).
Your application is likely using PHP’s $_SERVER[‘SCRIPT_NAME’] variable to determine the URL to use, and that won’t work correctly when using the CGI or FCGID PHP execution modes, it needs to determine that information a different way.
If it’s an application you’re building, the best way to fix it is to change the code to not use $_SERVER[‘SCRIPT_NAME’] to generate your URL’s.
If it’s a pre-existing application – some applications can be corrected by editing your $HOME/etc/php.ini file, and setting “cgi.fix_pathinfo” to “0”.
Another way to resolve it may be to go into Server Configuration -> Website Options, and change the PHP Execution Mode to mod_php.