You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mahmood Naderan <nt...@yahoo.com.INVALID> on 2018/06/03 18:06:50 UTC

[users@httpd] apache2 can not find the file

Hi,About my problem with apache which I described in another thread, I will know explain what I did from scratch.
See the system specs below

root@webshub:/var/www/html# ls
backedupindex.html  install_info.txt  ow_install      ow_smarty          ow_userfiles    shub
captcha.php         ow_core           ow_libraries    ow_static          ow_utilities    UPDATE.txt
CHANGELOG.txt       ow_cron           ow_log          ow_system_plugins  ow_version.xml
e500.php            ow_iis            ow_pluginfiles  ow_themes          ReadMe.pdf
index.php           ow_includes       ow_plugins      ow_updates         robots.txt
root@webshub:/var/www/html# cat /etc/apache2/sites-available/000-default.conf 
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
        <Directory /var/www/html/>
             Options FollowSymLinks
             AllowOverride All
             Order allow,deny
             allow from all
        </Directory>
    LogLevel debug 
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
root@webshub:/var/www/html#
root@webshub:/var/www/html# service apache2 restart




Now from another machine (my laptop in home), I ran the following command. Please note that w.x.y.z is the same as what I see in the ifconfig on the 'webshub' machine


mahmood@orca:~# wget http://w.x.y.z -O file.txt--2018-06-03 22:30:02--  http://w.x.y.z/
Connecting to w.x.y.z:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://w.x.y.z/install [following]
--2018-06-03 22:30:02--  http://w.x.y.z/install
Reusing existing connection to w.x.y.z:80.
HTTP request sent, awaiting response... 404 Not Found
2018-06-03 22:30:02 ERROR 404: Not Found.



At the same time that I ran wget on my laptop, in 'webshub' machine, I ran "tail -f /var/log/apache2/error.log" and see this output

[Sun Jun 03 22:33:23.671003 2018] [authz_core:debug] [pid 30012] mod_authz_core.c(809): [client 37.31.42.129:47438] AH01626: authorization result of Require all granted: granted
[Sun Jun 03 22:33:23.671197 2018] [authz_core:debug] [pid 30012] mod_authz_core.c(809): [client 37.31.42.129:47438] AH01626: authorization result of <RequireAny>: granted
[Sun Jun 03 22:33:23.671430 2018] [authz_core:debug] [pid 30012] mod_authz_core.c(809): [client 37.31.42.129:47438] AH01626: authorization result of Require all granted: granted
[Sun Jun 03 22:33:23.671457 2018] [authz_core:debug] [pid 30012] mod_authz_core.c(809): [client 37.31.42.129:47438] AH01626: authorization result of <RequireAny>: granted
[Sun Jun 03 22:33:23.710282 2018] [authz_core:debug] [pid 30012] mod_authz_core.c(809): [client 37.31.42.129:47438] AH01626: authorization result of Require all granted: granted
[Sun Jun 03 22:33:23.710326 2018] [authz_core:debug] [pid 30012] mod_authz_core.c(809): [client 37.31.42.129:47438] AH01626: authorization result of <RequireAny>: granted
[Sun Jun 03 22:33:23.710380 2018] [core:info] [pid 30012] [client 37.31.42.129:47438] AH00128: File does not exist: /var/www/html/install



What does that mean? Does that mean there is no 'install' file in /var/www/html?



Regards,
Mahmood

Re: [users@httpd] apache2 can not find the file

Posted by Riemer Palstra <ri...@palstra.com>.
Hi Mahmood,

> On 3 Jun 2018, at 21:00, Mahmood Naderan <nt...@yahoo.com.INVALID> wrote:
> 
> Now, I am working on a fresh ubuntu 1804. So, surely some configs are missing. Though .htaccess is the solution, but I would like to know if there is any NON .htaccess solution either.

As I said you can put the rewrites into the VirtualHost config instead of in an .htaccess of course, but you will need one of them AFAICS.

-- 
Riemer Palstra
riemer@palstra.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache2 can not find the file

Posted by Mahmood Naderan <nt...@yahoo.com.INVALID>.
Thanks for the reply. 

According to the following output, mod_rewrite is installed
root@webshub:/var/www/html# apachectl -M
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 php7_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 status_module (shared)
root@webshub:/var/www/html# vim .htaccess
root@webshub:/var/www/html# cat .htaccess 
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
root@webshub:/var/www/html# service apache2 restart




Then on my laptop, I can access the web installer without any error

mahmood@orca:~$ wget http://w.x.y.z
--2018-06-03 23:27:41--  http://w.x.y.z/
Connecting to w.x.y.z:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://w.x.y.z/install [following]
--2018-06-03 23:27:41--  http://w.x.y.z/install
Reusing existing connection to 5.57.36.104:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://w.x.y.z/install/rules [following]
--2018-06-03 23:27:41--  http://w.x.y.z/install/rules
Reusing existing connection to w.x.y.z:80.
HTTP request sent, awaiting response... 200 OK
Length: 6952 (6.8K) [text/html]
Saving to: ‘index.html’

index.html               100%[==================================>]   6.79K  --.-KB/s    in 0.006s  

2018-06-03 23:27:41 (1.07 MB/s) - ‘index.html’ saved [6952/6952]





The app documents doesn't say anything about htaccess. I have to say that on a web server which is working for some years, I was able to see the web installer and I didn't create any .htaccess file. I don't know but maybe the web server admins had installed some other things before and the results was that I was able to see the installer.

Now, I am working on a fresh ubuntu 1804. So, surely some configs are missing. Though .htaccess is the solution, but I would like to know if there is any NON .htaccess solution either.




Regards,
Mahmood 



    On Sunday, June 3, 2018, 11:20:44 PM GMT+4:30, Riemer Palstra <ri...@palstra.com> wrote:  
 
 Hi Mahmood,

Looking at the list of files and the URL that’s being searched for, there isn’t any “install" file or directory present. Probably your webapplication is trying to access that URL but you’re missing some kind of Redirect rules to handle URL’s through the index.php? 

Hopefully you’ll find it it the app’s documentation, but it might be something as simple as: 

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

Depending on your configuration, this could be in your config file, or in a .htaccess file and make sure that mod_rewrite is available.

-- 
Riemer Palstra
riemer@palstra.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
  

Re: [users@httpd] apache2 can not find the file

Posted by Riemer Palstra <ri...@palstra.com>.
Hi Mahmood,

> On 3 Jun 2018, at 20:32, Mahmood Naderan <nt...@yahoo.com.INVALID> wrote:
> 
> I want to know why I can not directly see the web installer (complain about /install not found) while I can see that with php command?
> 
> That mean the files are there but apache can not find them.

Looking at the list of files and the URL that’s being searched for, there isn’t any “install" file or directory present. Probably your webapplication is trying to access that URL but you’re missing some kind of Redirect rules to handle URL’s through the index.php? 

Hopefully you’ll find it it the app’s documentation, but it might be something as simple as: 

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

Depending on your configuration, this could be in your config file, or in a .htaccess file and make sure that mod_rewrite is available.

-- 
Riemer Palstra
riemer@palstra.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache2 can not find the file

Posted by Mahmood Naderan <nt...@yahoo.com.INVALID>.
Now, on 'webshub' machine, if I run
root@webshub:/var/www/html# php -S w.x.y.z:8080
PHP 7.2.5-0ubuntu0.18.04.1 Development Server started at Sun Jun  3 22:58:42 2018
Listening on http://w.x.y.z:8080
Document root is /var/www/html
Press Ctrl-C to quit.
[Sun Jun  3 22:58:47 2018] 37.31.42.129:43846 [301]: /
[Sun Jun  3 22:58:47 2018] 37.31.42.129:43848 [301]: /install
[Sun Jun  3 22:58:47 2018] 37.31.42.129:43850 [200]: /install/rules
[Sun Jun  3 22:58:48 2018] 37.31.42.129:43852 [200]: /ow_install/view/style.css
[Sun Jun  3 22:58:48 2018] 37.31.42.129:43854 [200]: /ow_install/view/img/FARSISans/FARSISansExpanded.woff2
[Sun Jun  3 22:58:48 2018] 37.31.42.129:43856 [200]: /ow_install/view/img/FARSISans/FARSISans-Bold.woff2




Those outputs are printed when I enter http://w.x.y.z:8080 in firefox on my laptop and I can see the web installer.
I want to know why I can not directly see the web installer (complain about /install not found) while I can see that with php command?
That mean the files are there but apache can not find them.




Regards,
Mahmood 

    On Sunday, June 3, 2018, 10:37:03 PM GMT+4:30, Mahmood Naderan <nt...@yahoo.com.INVALID> wrote:  
 
 Hi,About my problem with apache which I described in another thread, I will know explain what I did from scratch.
See the system specs below

root@webshub:/var/www/html# ls
backedupindex.html  install_info.txt  ow_install      ow_smarty          ow_userfiles    shub
captcha.php         ow_core           ow_libraries    ow_static          ow_utilities    UPDATE.txt
CHANGELOG.txt       ow_cron           ow_log          ow_system_plugins  ow_version.xml
e500.php            ow_iis            ow_pluginfiles  ow_themes          ReadMe.pdf
index.php           ow_includes       ow_plugins      ow_updates         robots.txt
root@webshub:/var/www/html# cat /etc/apache2/sites-available/000-default.conf 
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
        <Directory /var/www/html/>
             Options FollowSymLinks
             AllowOverride All
             Order allow,deny
             allow from all
        </Directory>
    LogLevel debug 
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
root@webshub:/var/www/html#
root@webshub:/var/www/html# service apache2 restart




Now from another machine (my laptop in home), I ran the following command. Please note that w.x.y.z is the same as what I see in the ifconfig on the 'webshub' machine


mahmood@orca:~# wget http://w.x.y.z -O file.txt--2018-06-03 22:30:02--  http://w.x.y.z/
Connecting to w.x.y.z:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://w.x.y.z/install [following]
--2018-06-03 22:30:02--  http://w.x.y.z/install
Reusing existing connection to w.x.y.z:80.
HTTP request sent, awaiting response... 404 Not Found
2018-06-03 22:30:02 ERROR 404: Not Found.



At the same time that I ran wget on my laptop, in 'webshub' machine, I ran "tail -f /var/log/apache2/error.log" and see this output

[Sun Jun 03 22:33:23.671003 2018] [authz_core:debug] [pid 30012] mod_authz_core.c(809): [client 37.31.42.129:47438] AH01626: authorization result of Require all granted: granted
[Sun Jun 03 22:33:23.671197 2018] [authz_core:debug] [pid 30012] mod_authz_core.c(809): [client 37.31.42.129:47438] AH01626: authorization result of <RequireAny>: granted
[Sun Jun 03 22:33:23.671430 2018] [authz_core:debug] [pid 30012] mod_authz_core.c(809): [client 37.31.42.129:47438] AH01626: authorization result of Require all granted: granted
[Sun Jun 03 22:33:23.671457 2018] [authz_core:debug] [pid 30012] mod_authz_core.c(809): [client 37.31.42.129:47438] AH01626: authorization result of <RequireAny>: granted
[Sun Jun 03 22:33:23.710282 2018] [authz_core:debug] [pid 30012] mod_authz_core.c(809): [client 37.31.42.129:47438] AH01626: authorization result of Require all granted: granted
[Sun Jun 03 22:33:23.710326 2018] [authz_core:debug] [pid 30012] mod_authz_core.c(809): [client 37.31.42.129:47438] AH01626: authorization result of <RequireAny>: granted
[Sun Jun 03 22:33:23.710380 2018] [core:info] [pid 30012] [client 37.31.42.129:47438] AH00128: File does not exist: /var/www/html/install



What does that mean? Does that mean there is no 'install' file in /var/www/html?



Regards,
Mahmood