Digital Point Forums
San Diego Models

Go Back   Digital Point Forums > Design & Development > Site & Server Administration > Traffic Analysis
Google Analytics
Log In to view
your analytics

Reply
 
Thread Tools
  #1  
Old Mar 5th 2005, 2:12 am
crazyhorse crazyhorse is offline
of the Nightfall
 
Join Date: Dec 2004
Location: Netherlands
Posts: 1,137
crazyhorse is on a distinguished road
Are there any log files on a virtual server?

I have asked my host they told me it wasnt possible to download logfiles from a virtual server. They use awstats , no control panel. Anyone care to comment on what else i could do. I guess awstats needs to read some files somewhere in order to display data,right, why cant i download those?
Reply With Quote
  #2  
Old Mar 5th 2005, 8:13 am
flawebworks's Avatar
flawebworks flawebworks is offline
Tech Services
 
Join Date: Apr 2004
Location: here
Posts: 991
flawebworks will become famous soon enough
They *should* offer raw log files; but it depends on the host. And it's no big deal to grep your site from the apache logfiles and write to a texfile. Even simpler; config apache to give you your logfiles.
Do you happen to have a cpanel server? If so; it can be configured to save your logfiles so you can get the raw logs once a month. This can be configured in the cpanel.
Reply With Quote
  #3  
Old Mar 5th 2005, 9:01 am
crazyhorse crazyhorse is offline
of the Nightfall
 
Join Date: Dec 2004
Location: Netherlands
Posts: 1,137
crazyhorse is on a distinguished road
Nope wish i had a Cpanel but i dont. I ll just make a call on monday and ask them whether they can give me permission to download the log files. Im already aware of what directory they are in but i dont have permission to enter the dir.
Reply With Quote
  #4  
Old Mar 5th 2005, 10:06 am
J.D. J.D. is offline
of the Nightfall
 
Join Date: Nov 2004
Posts: 1,198
J.D. has a spectacular aura aboutJ.D. has a spectacular aura about
I agree with flawebworks, you should be able to look at the logs. Analysis data just doesn't offer the same level of information (e.g. if somebody tried to hack your website).

From the configuration point of view, there are two ways to produce per-virtual host logs: a) using CustomLog and ErrorLog inside VirtualHost section in the main configuration file; b) by logging the host name (%v) and splitting the main log file once in a while.

In the first case you will have log information as soon as Apache flushes it current log buffers, in the second, usually, once a day. Some hosting companies avoid the first method because it puts additional strain on the system.

J.D.
Reply With Quote
  #5  
Old Mar 5th 2005, 10:54 am
flawebworks's Avatar
flawebworks flawebworks is offline
Tech Services
 
Join Date: Apr 2004
Location: here
Posts: 991
flawebworks will become famous soon enough
Crazyhorse; I just had a thought. What kind of operating system is your site on and where are the log files? (path)
Reply With Quote
  #6  
Old Mar 5th 2005, 11:33 am
crazyhorse crazyhorse is offline
of the Nightfall
 
Join Date: Dec 2004
Location: Netherlands
Posts: 1,137
crazyhorse is on a distinguished road
Well i had a look at the config file of awstat and this is what i can come up with:
LogFile="/usr/local/apache2/logs/www.precon-nederland.nl.log"

Not sure this is the path we are looking for but i guess it is. And if not mistaking its linux that is used as OS.
Reply With Quote
  #7  
Old Mar 5th 2005, 11:45 am
flawebworks's Avatar
flawebworks flawebworks is offline
Tech Services
 
Join Date: Apr 2004
Location: here
Posts: 991
flawebworks will become famous soon enough
Quote:
Originally Posted by crazyhorse
Well i had a look at the config file of awstat and this is what i can come up with:
LogFile="/usr/local/apache2/logs/www.precon-nederland.nl.log"

Not sure this is the path we are looking for but i guess it is. And if not mistaking its linux that is used as OS.
Give this a try. You'll need to set it up as a cron job; though I suppose you can test it by doing a ./log.sh. Can't remember; it's been awhile.

I found this back when I had a hosting account that didn't offer log files; ran it in a cron job once a day. It at least gave me my logs.

Create a text file; name it log.sh, put it in your root directory. Put this in it:

#!/bin/sh

DATE=`date +%m%d`
LOGDIR='/usr/local/apache2/logs'
TODIR='/home/youruserid/public_html/logdirectory'

cp $LOGDIR/www.precon-nederland.nl $TODIR/youruserid$DATE.log

The LOGDIR is the log directory on your hosting server. The TODIR is your directory you want to put the log files in in your root directory. You may or may not have a public_html directory; use whatever applies to you.
You may also have to play with this some; you may have to use the
/usr/local/apache2/logs/www.precon-nederland.nl.log for the LOGDIR command; but try with out first.
Reply With Quote
  #8  
Old Mar 5th 2005, 11:52 am
J.D. J.D. is offline
of the Nightfall
 
Join Date: Nov 2004
Posts: 1,198
J.D. has a spectacular aura aboutJ.D. has a spectacular aura about
This explains why you can't access your log files - your hosting company produces per-site log files, but keeps all of them in the same directory. It's a misconfiguration on their part. If they can't configure Apache to output log files in one of your directories, they should run a job to copy your files from the shared directory to one of yours.

I'd be very surprised if you could access any of the files in the shared directory - this would be a huge security hole. Before trying the script, do

ls -al /usr/local/apache2/logs/

to see if you have read access. If you do, and you see other people's files in there, it's time to change your hosting company.

J.D.
Reply With Quote
  #9  
Old Mar 6th 2005, 1:31 am
crazyhorse crazyhorse is offline
of the Nightfall
 
Join Date: Dec 2004
Location: Netherlands
Posts: 1,137
crazyhorse is on a distinguished road
Quote:
Originally Posted by J.D.
I'd be very surprised if you could access any of the files in the shared directory - this would be a huge security hole. Before trying the script, do

ls -al /usr/local/apache2/logs/

to see if you have read access. If you do, and you see other people's files in there, it's time to change your hosting company.

J.D.
I do have read acces , i havnt tried to download any of the files that are actually there. I ll contact them about it on monday. I have just switched hosts so i dont really feel like changing again, but i do think it is necesarry to contact them about it. I havnt tried the script above cuase the be honest im not such a techy myself and i dont want to screw it up, so that in the end nothing works
Reply With Quote
  #10  
Old Mar 6th 2005, 1:33 am
crazyhorse crazyhorse is offline
of the Nightfall
 
Join Date: Dec 2004
Location: Netherlands
Posts: 1,137
crazyhorse is on a distinguished road
Quote:
Originally Posted by flawebworks
Give this a try. You'll need to set it up as a cron job; though I suppose you can test it by doing a ./log.sh. Can't remember; it's been awhile.

I found this back when I had a hosting account that didn't offer log files; ran it in a cron job once a day. It at least gave me my logs.

Create a text file; name it log.sh, put it in your root directory. Put this in it:

#!/bin/sh

DATE=`date +%m%d`
LOGDIR='/usr/local/apache2/logs'
TODIR='/home/youruserid/public_html/logdirectory'

cp $LOGDIR/www.precon-nederland.nl $TODIR/youruserid$DATE.log

The LOGDIR is the log directory on your hosting server. The TODIR is your directory you want to put the log files in in your root directory. You may or may not have a public_html directory; use whatever applies to you.
You may also have to play with this some; you may have to use the
/usr/local/apache2/logs/www.precon-nederland.nl.log for the LOGDIR command; but try with out first.
Thanks although i first need to figure out how to set a cron job properly
Reply With Quote
  #11  
Old Mar 6th 2005, 1:40 am
J.D. J.D. is offline
of the Nightfall
 
Join Date: Nov 2004
Posts: 1,198
J.D. has a spectacular aura aboutJ.D. has a spectacular aura about
Quote:
Originally Posted by crazyhorse
I do have read acces , i havnt tried to download any of the files that are actually there. I ll contact them about it on monday. I have just switched hosts so i dont really feel like changing again, but i do think it is necesarry to contact them about it.
I'm not trying to scare you with this - just make sure that you can't read other people's files and that they can't read yours. If you run ls and see other people's files, it is already a security breach, without even looking inside these files (e.g. you will know what domains are hosted on this machine, how fast they grow, etc). If you can read somebody else's files or they can read yours, this is really bad - somebody may just steal your or your clients' data (e.g. somebody may be able to hijack your visitor's session and steal their credit card number) and, under some circumstances, even hack into the machine.

J.D.
Reply With Quote
  #12  
Old Mar 6th 2005, 1:44 am
crazyhorse crazyhorse is offline
of the Nightfall
 
Join Date: Dec 2004
Location: Netherlands
Posts: 1,137
crazyhorse is on a distinguished road
Well the first thing that came up in my mind is adding a extra link, in the config awstats file, that would give me in a instant 1000 maybe less or more new fresh set of backlinks. I know its bad to think like that but that was the first thing that came into my mind. Still appreciate what you just mentioned above and i will notify them about it and then continue on how to get the log files so that i eventually can do some studying on the actual data.
Reply With Quote
  #13  
Old Oct 27th 2007, 11:17 am
bryon844 bryon844 is offline
Grunt
 
Join Date: Oct 2007
Posts: 31
bryon844 is on a distinguished road
Hi!
Don't you have root access to your virtual server? All my virtual servers have logs in

/var/log

just like the real thing. I, myself, would never have a virtual server I didn't have root access to and complete control.

Bryon
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Transitioning Optigold to a New Server nuwanet Optigold ISP 8 Jan 18th 2007 2:08 pm
PHP in HTML with IIS Solution ProductivePC Setup / Validation Help 19 May 30th 2006 8:40 am
how to insert header/footer server side for existing html files jjdubb Programming 30 Jan 28th 2006 10:54 pm
Preview in a webbrowser on a virtual server? crazyhorse Site & Server Administration 14 Feb 8th 2005 12:55 am
passthru.php, shtml files, etc. Owlcroft Co-op Advertising Network 3 Dec 20th 2004 3:39 pm


All times are GMT -8. The time now is 7:58 pm.