|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Access logs probs
I've inherited a Cobalt RaQ2 which I have little experience running coming from a graphics background, and for some reason the access logs directory can only hold half our monthly data.
This means every month our web report is only half complete as the older logs have been overwritten by the latest ones. I have tried to rotate logs but it is not working, I think some of the configuration files have been moved around as often programs are not where they should be. I have also tried to backup the older logs and then upload back into log directory with new name, so the report machine will find them. But even as administrator, it says I do not have permission. Any help suggestions appreciated. Thanks.. |
|
#2
|
|||
|
|||
|
>> the older logs have been overwritten by the latest ones.
You mean the gzip compressed log (i.e. access_log.1.gz)? >> then upload back into log directory with new name You should ask someone who knows little programming to write a script for you, then you can run such script via a cron. Personally, I hate to see too many log files (compressed-after rotation and uncompressed) in /var/log dir. So what I usually do is to run a script via cron daily so it can move the *.gz log files out of /var/log, uncompress them back to human-readable ASCII format, move it to another location. For the next cron schedule, use append-mode and append the new *.gz logs to that log files in that location. At the end of month, move those logs to another location (i.e. /opt/log/2001-12). |
|
#3
|
|||
|
|||
|
Thanks for your help, I have scanned the directories and seen files called cron and rotatelogs but they make no sense to me, and even when I try to edit them as well as the httpd.config, my changes are never saved??
Personally I feel I'm way out of my depth, my ISP processes the logs and takes them from the /home/sites/site1/logs directory. I have asked if they could retrieve from another directory but they say I have to set this up?? any clues...?The problem is I do not seem to have permissions to upload to this log directory - even as administrator - and thus cannot ensure there is a months worth of data there. (Every report has only 2 weeks worth of activity on a four week graph, cutting the monthly results by half.) I could backup a months worth of logs, but not in the directory that matters!! How could I double the capacity of this logs directory? Many thanks.. |
|
#4
|
|||
|
|||
|
>> changes are never saved?
You need to HUP Apache. >> my ISP processes the logs I thought you are running your own server. >> they say I have to set this up? Apache is highly configurable so your ISP's setup may vary. You should ask them for that. >> even as administrator There is no such default user in Linux/Unix. >> How could I double the capacity You need to ask your ISP for that. Perhaps they have set a quota on your your account. |
|
#5
|
|||
|
|||
|
>>You need to HUP Apache
what is HUP apache? >>I thought you are running your own server. I inherited the server and am supposed to be running it although I do not know how. We pay the ISP to produce the reports.. but they will not do anything more without massive payments which my boss won't clear.. >> There is no such default user in Linux/Unix. (administrator) I thought admin had the highest permissions after root, and everything I've read warns against logging in as root. Not that I'd know how? >>Perhaps they have set a quota on your your account. Before they produce the report, I can see there is only a half months data in our log directory. I am sure it is because of a setting on our RaQ. Thanks.. |
|
#6
|
|||
|
|||
|
>> what is HUP apache?
Whenever you alter your httpd.conf, you need to tell your running Apache to reread the httpd.conf file. Running apachectl graceful should be fine. >> I thought admin had the highest permissions after root Administrator user in $M has the highest permission but there is no such user in Linux/UNIX. >> Not that I'd know how? Run su. |
|
#7
|
|||
|
|||
|
Thankyou, you have been helpfull.. I am finding looking after this webserver really baffling..
It took me three weeks to discover you had to telnet through port 23 - and this was after buying a £30 Linux apache webserver administration book which only mentioned port 80!! It's from the Craig Hunt Linux Library and I would recommend all newbies to avoid it at all costs... it didn't seem to relate to my Cobalt Raq2 at all. When you say run su, do you mean you type 'su' in after logging in as admin through telnet port 23? Is this to gain root access? Why would you need to gain root access? Also, is there any way of finding out what modules are running on the server, or are present and could be installed. In the httpd.conf file it states module documentation can be found in "/home/httpd/manual/mod" but when I looked there was nothing there?? Cheers.. ![]() |
|
#8
|
|||
|
|||
|
Most of the files on your system have a permission of -rw-r--r-- (644) owned by root and grouped by root. Yes, you can READ but you can't write while logging in as a normal user.
To find out the installed modules, you can run http://www.yourdomain.com/server-info. However, you need to give access permission before you can access that URL. Check your httpd.conf and look for: <Location /server-info> SetHandler server-info Order deny,allow Deny from all Allow from your.external.ip.here </Location> If you are accessing that URL from the same box, you should append 127.0.0.1 to the Allow from line (a single whitespace delimited). |
|
#9
|
|||
|
|||
|
AARGH!
Could not find; <Location /server-info> SetHandler server-info Order deny,allow Deny from all Allow from your.external.ip.here </Location> anywhere in my httpd.conf file?? Also file not found error at address www.mydomain.com/server-info?? Can you see why this job is driving me crazy??.... Where do I go from here?? Is there any easy way to get this webserver managable? |
|
#10
|
|||
|
|||
|
If it's not already there, just add it.
|
|
#11
|
|||
|
|||
|
Can I just add it anywhere in the httpd.conf file?
Will I have to log on as root to do this? How would you do it? Thx. |
|
#12
|
|||
|
|||
|
Add those to your httpd.conf in a position somewhere in the middle not within any <VirtualHost> or any other <XXX> block.
You need root priviledge to write to httpd.conf. You also need to be root to restart Apache. |
|
#13
|
|||
|
|||
|
I would normally try to edit the httpd.conf file through cuteftp, logging in as admin. This is probably why it has never worked!
How would I edit httpd.conf as root? Would I have to telnet in or can I do this through an ftp program? If I have to do it through telnetting then how would I do this? Thank you, your help is giving me hope!! ![]() |
|
#14
|
|||
|
|||
|
>> I would normally try to edit the httpd.conf file through cuteftp
That's fine. >> Would I have to telnet in or can I do this through an ftp program? FTP, as the name implies, is not a text editor. You can download and edit httpd.conf in Windows, but you do need root priviledge to overwrite the old httpd.conf on the server with your new httpd.conf you are about to upload. Of course, if you login as root via FTP (bad), you can overwrite anything with root priviledge. BTW, please don't say admin user anymore as there is no such default super user in *NIX. You might created such user and gave him super user priviledge but again, there is no such user. So don't say it again as that misconceives readers and yourself. |
|
#15
|
|||
|
|||
|
What would I need to do to overwrite the httpd.conf then?
I do not know how to log on as root through ftp, as the only password I know is the one I have set up for the administrator? If I was to do this through telnet, what commands would I need to run? I assume I would first open ms dos and type: 'telnet my.server.com 23' then I would log on with user name and password then I would gain root access by typing 'su' how would I then upload my edited httpd.conf - overwriting the old one? Thankyou.... |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Access logs probs |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|