Why I can't download a file via Apache?

Issues related to applications and software problems
hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Why I can't download a file via Apache?

Post by hack3rcon » 2019/06/23 06:02:38

Comment out? Is you mean:

Code: Select all

DirectoryIndex index.html index.htm index.php index.php4 index.php5
?

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Why I can't download a file via Apache?

Post by hunter86_bg » 2019/06/23 13:59:02

Yes, comment it out and try again.

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Why I can't download a file via Apache?

Post by hack3rcon » 2019/06/23 15:01:47

I did and restart Apache service but not matter.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Why I can't download a file via Apache?

Post by hunter86_bg » 2019/06/24 04:14:43

What is the error in the logs ?

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Why I can't download a file via Apache?

Post by hack3rcon » 2019/06/24 05:30:22

It show me:

Code: Select all

# wget http://web.com/file.file
--2019-06-24 09:58:57--  http://web.com/file.file
Resolving web.com (web.com)... XXX.XXX.XXX.XXX
Connecting to web.com (web.com)|XXX.XXX.XXX.XXX|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-06-24 09:58:58 ERROR 404: Not Found.
Last edited by hack3rcon on 2019/06/25 20:11:35, edited 1 time in total.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Why I can't download a file via Apache?

Post by hunter86_bg » 2019/06/24 20:25:36

I mean the error logs on the server.
Check /var/log/httpd/ directory for the apache logs.
Of course , you have set different logs in the VirtualHost stanza ( /srv/web/logs/website_error_log & custom) , so check them also.

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Why I can't download a file via Apache?

Post by hack3rcon » 2019/06/25 10:50:59

OK. The logs are:

Code: Select all

# cat /var/log/httpd/error_log
[Sun Jun 23 10:20:42 2019] [notice] caught SIGTERM, shutting down
[Sun Jun 23 10:20:42 2019] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Jun 23 10:20:42 2019] [notice] Digest: generating secret for digest authentication ...
[Sun Jun 23 10:20:42 2019] [notice] Digest: done
[Sun Jun 23 10:20:42 2019] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.4.45 configured -- resuming normal operations

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Why I can't download a file via Apache?

Post by aks » 2019/06/25 19:11:26

No I think hunter86_bg wants the output of the following logs:
/srv/web/logs/website_error_log
/srv/web/logs/website_access_log

Is web.com really x.x.x.x/32?

You're getting 404 Not Found - that's the big clue here. Does the file exist and is it readable by the apache user (or whomever the httpd process run as)? Also can the apache user (or whomever the httpd process run as) traverse to where the file exists (if it does exist)? And finally is the host resolved correctly?

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Why I can't download a file via Apache?

Post by TrevorH » 2019/06/25 19:23:48

Is web.com really x.x.x.x/32?
I really wish people wouldn't try to obscure information by re-using common or well known site names.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Why I can't download a file via Apache?

Post by hack3rcon » 2019/06/25 20:15:37

aks wrote:
2019/06/25 19:11:26
No I think hunter86_bg wants the output of the following logs:
/srv/web/logs/website_error_log
/srv/web/logs/website_access_log

Is web.com really 164.138.18.155/32?

You're getting 404 Not Found - that's the big clue here. Does the file exist and is it readable by the apache user (or whomever the httpd process run as)? Also can the apache user (or whomever the httpd process run as) traverse to where the file exists (if it does exist)? And finally is the host resolved correctly?
It is a project.
Both files are empty.

Post Reply