Mobile app version of vmapp.org
Login or Join
Goswami781

: Is it normal when the request line of apache log contains a ~username component? I have a site at a big hosting company and I checked the apache log generated by the site and I saw requests

@Goswami781

Posted in: #Apache #ApacheLogFiles

I have a site at a big hosting company and I checked the apache log generated by the site and I saw requests like this in it:

"GET hostname/~username/proj/favicon.ico HTTP/1.1"


Where hostname is the hostname of the site, username is my username at the hosting company, and proj is the directory where the site is hosted.

What surprises me is that the request shows the actual directory structure instead of the actual request ("GET hostname/favicon.ico HTTP/1.1"). Is this normal? Shouldn't it show the actual HTTP request, instead of this translated request path?

I find it strange that the actual HTTP request does not appear in the log at all. Surely, the browsers don't know my username and the project directory at the hosting company, so it can't be the actual HTTP request what the client made.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Goswami781

1 Comments

Sorted by latest first Latest Oldest Best

 

@Speyer207

LogFormat and similar

Apache and other major players in the web service space generally will allow customisation to access and error logs. The access log of "GET hostname/~username/proj/favicon.ico HTTP/1.1" is normal and working as intended, it is happening because your host is using LogFormat to output a log more to their liking.

In this case its most likely something like:

LogFormat "%h %l %u %t %v "%r" %>s %b "%{User-agent}i""


%h is the name of the hostname, %u is username and the other options do other things that you can find out more about LogFormat on Apache Module mod_log_config official help page. If you dislike their log files then you can setup a cron job that will copy the log file and then find and replace the parts you dislike, most web hosts allow cron jobs and if your with a good one then you should also have SSH access what makes it even easier.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme