LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2005, 05:01 PM   #31
NeoNero
LQ Newbie
 
Registered: Oct 2005
Location: London, UK
Distribution: Slackware 10.2
Posts: 23

Original Poster
Rep: Reputation: 15

Take a look at this: http://www.analog.cx/docs/logfmt.html

In particular the apachelogformat part. After changing my analog.cfg file to reflect the formatting, I lost the corrupt error!

Now I just have an M error.. not sure why this is. Perhaps I dont have enough data:

Quote:
Logfile contains lines with no file names (or bytes): page (or byte) counts may be low
If a logfile line doesn't contain a file name, analog will assume that the request wasn't for a page. Similarly, if it doesn't give the number of bytes transferred, analog will make the bytes zero. So the number of page requests or bytes credited to the other items on that line will then be too low.
But hey it works! http://smsfrancis.is-a-geek.com/reports/

Last edited by NeoNero; 10-31-2005 at 05:07 PM.
 
Old 10-31-2005, 05:43 PM   #32
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 427

Rep: Reputation: 30
Question How to publish webpage?

Congratulations NeoNero, you make it works!

Last edited by fhleung; 11-03-2005 at 01:23 AM.
 
Old 10-31-2005, 06:09 PM   #33
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
neonero, I've tried using APACHELOGFORMAT and several other things but I get:

analog: analog version 6.0/Unix
analog: Warning L: Large number of corrupt lines in logfile
/var/log/apache/access_log: turn debugging on or try different LOGFORMAT
(For help on all errors and warnings, see docs/errors.html)
Current logfile format:
%S %j %j [%d/%M/%Y:%h:%n:%j] "%j%w%r%wHTTP%j" %c %b\n
%S %j %j [%d/%M/%Y:%h:%n:%j] "%j%w%r" %c %b\n
%S %j %j [%d/%M/%Y:%h:%n:%j] "%r" %c %b\n
analog: Warning R: Turning off empty Search Word Report
analog: Warning R: Turning off empty Operating System Report

My analog.cfg is this, currently:

LOGFILE /var/log/apache/access_log
# LOGFILE /old/logs/access_log.*
OUTFILE /home/simon/apache/log
HOSTNAME "oliverroad.selfip.com"

I was wondering what you have in httpd.conf?

It may be that analog doesn't work well with apache, which is odd as apache is widely used. My httpd.conf:

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
CustomLog /var/log/apache/access_log common

I've tried combined and common in analog.cfg.
 
Old 10-31-2005, 06:17 PM   #34
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
Well some how or other , despite error warnings, I am actually getting an output file with facts and figures. So it seems to be working.
 
Old 10-31-2005, 07:14 PM   #35
NeoNero
LQ Newbie
 
Registered: Oct 2005
Location: London, UK
Distribution: Slackware 10.2
Posts: 23

Original Poster
Rep: Reputation: 15
Current settings

httpd.conf

Quote:
DefaultLanguage en

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
The CustomLog section is within httpd.conf and is as follows (combined):

Quote:
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
CustomLog logs/access_log combined
#
# If you would like to have agent and referer logfiles, uncomment the
# following directives.
#
#CustomLog logs/referer_log referer
#CustomLog logs/agent_log agent

#
# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
CustomLog logs/access_log combined
analog.cfg

Quote:
APACHELOGFORMAT (%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\")
APACHELOGFORMAT (%h %l %u %t \"%r\" %>s %b)
APACHELOGFORMAT (%{Referer}i -> %U)
APACHELOGFORMAT (%{User-agent}i)

LOGFILE /usr/local/apache2/logs/access_log

OUTPUT COMPUTER
OUTFILE /root/report.dat
There's some delicate syntax differences in those two, so be careful. But it solved my problems.
 
Old 11-01-2005, 04:57 AM   #36
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 427

Rep: Reputation: 30
Web Server Help/How to publish webpage?

I would like to publish my webpage to let outside world take a look. The reason why I can not get to webpage is unclear at the moment. Any help would be greatly appreciated

I find several threads related to this topic. And I got similar problems, so I post my questions here. I have tried many different things and I just post what I have done here.

I forward 2 ports 80(http) and 53(DNS), let incoming requests on web server (192.168.1.107)

Code:
 Port Forward
Application  Start End Protocol IP Address       Enable
http 80    80   tcp/udp 192.168.1.107   x
dns  53    53   tcp/udp 192.168.1.107   x
Also put the private IP (192.168.1.107) in DMZ which let all incoming ports open on only one machine. My dynamic IP account (xxxx.dyndns.org) details also set in the gateway router wrt54g which update the IP automatically.

If outside machines access my page(http://www.mysite.com), the registered domain points to my dynamic IP account (xxxx.dyndns.org). And account details also set in the gateway router.

My /etc/hosts
Code:
 
127.0.0.1  localhost.localdomain localhost
192.168.1.107  www.mysite.com
My configure in /etc/httpd/conf/httpd.conf should be fine.

I also have a look of xinetd.conf, hosts.allow, hosts.deny..............

While stop the iptables service, I use text browser lynx to test and I have the following errors:
503 Service unavailable

ERROR
The requested URL could not be retrieved
While trying to retrieve the URL http://xxxx.dyndns.org
The follow error was encountered:
connection failed
They system returned:
(111) connection refused

I can only see the page in local machine but not from outside, others machines in the LAN can only view the page without graphic.

Any help would be greatly appreciated

Last edited by fhleung; 11-03-2005 at 02:06 AM.
 
Old 11-01-2005, 08:04 AM   #37
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
Yeh I've got it working now by adding more than one logformat. The output isn't very uptodate though. Maybe there's a better webstats tool.
 
Old 11-03-2005, 02:15 AM   #38
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 427

Rep: Reputation: 30
Any help would be greatly appreciated
 
Old 11-03-2005, 02:59 AM   #39
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Quote:
Originally posted by NeoNero
The problem of not being able to see a 'live' net version of my website is a slight pain, and no one has offered a way to get around it other than to view it locally. Maybe its router specific.. tho there must be a way around it.

A short explanation of why this happens may help. When your system sends the request the DNS server sees the request coming from the public address assigned by your isp. The DNS server gets confused because you are requesting the same address and it cannot solve it.
There are a few methods of overcoming this; the first is to implement networking loop back which is an internal trick and requests actually don't go out. I do not know how to implement loop back. The second and commonest method is to work through a public proxy server. i.e. you set the browser to use a proxy server. You can find a list of proxy servers here . The last method involves using another connection method which has a different ip address e.g. using a pay-as-you-go dialup service. In the UK www.f2s.com has details of a number that you can dial at 1p/minute.
 
Old 11-03-2005, 04:47 PM   #40
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 427

Rep: Reputation: 30
Web Server Help/How to publish webpage?

I would like to publish my webpage to let outside world take a look. The reason why outside can not get to webpage is unclear at the moment. Any help would be greatly appreciated

I find several threads related to this topic. And I got similar problems, so I post my questions here. I have tried many different things and I just post what I have done here.

I forward 2 ports 80(http) and 53(DNS), let incoming requests on web server (192.168.1.107)

Code:
 Port Forward
Application  Start End Protocol IP Address       Enable
http 80    80   tcp/udp 192.168.1.107   x
dns  53    53   tcp/udp 192.168.1.107   x
Also put the private IP (192.168.1.107) in DMZ which let all incoming ports open on only one machine. My dynamic IP account (xxxx.dyndns.org) details also set in the gateway router wrt54g which update the IP automatically.

If outside machines access my page(http://www.mysite.com), the registered domain points to my dynamic IP account (xxxx.dyndns.org). And account details also set in the gateway router.

My /etc/hosts
Code:
 
127.0.0.1  localhost.localdomain localhost
192.168.1.107  www.mysite.com
My configure in /etc/httpd/conf/httpd.conf should be fine.

I also have a look of xinetd.conf, hosts.allow, hosts.deny..............

While stop the iptables service, I use text browser lynx to test and I have the following errors:
503 Service unavailable

ERROR
The requested URL could not be retrieved
While trying to retrieve the URL http://xxxx.dyndns.org
The follow error was encountered:
connection failed
They system returned:
(111) connection refused

I can only see the page in local machine but not from outside, others machines in the LAN can only view the page without graphic.

Any help would be greatly appreciated

Last edited by fhleung; 11-03-2005 at 04:52 PM.
 
Old 11-03-2005, 05:46 PM   #41
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
Why are you trying to do dmz. That's quite advanced. I would not worry about that at the moment. That might be your problem. You only have to open the ports on your router and forward them to the right ip on the lan for your box. Also you shouldn't need to open the incoming dns port, unless you're running your own dns server. Keep it simple to begin with.
 
Old 11-03-2005, 06:16 PM   #42
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 427

Rep: Reputation: 30
Thank you for the kindly reply, I would like start from simple and do it step by step according to the documentation/tutorial/wiki/google result etc. But still can not make it work.

I using a router and ADSL modem with ethernet interface. The address of the devices are 192.168.1.1 and 10.1.1.1 respectively, would it be the problem?

Last edited by fhleung; 11-03-2005 at 06:57 PM.
 
Old 11-04-2005, 12:48 PM   #43
doublejoon
Member
 
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 370

Rep: Reputation: 44
Just get "awstats"....should give you all the info you need
 
Old 11-04-2005, 04:22 PM   #44
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Quote:
Originally posted by fhleung
Thank you for the kindly reply, I would like start from simple and do it step by step according to the documentation/tutorial/wiki/google result etc. But still can not make it work.

I using a router and ADSL modem with ethernet interface. The address of the devices are 192.168.1.1 and 10.1.1.1 respectively, would it be the problem?
The ethernet and adsl lan side need to be on the same subnet. If the adsl has an address of 192.168.1.1 then you need to make the ethernet address something like 192.168.1.2 and set the gateway to 192.168.1.1
 
Old 11-04-2005, 05:08 PM   #45
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
Yes, for example, the address of my router is 192.168.0.1, and the 2 pc's are normally assigned 192.168.0.2 and 192.168.0.3. Those numbers can go up to 192.168.0.254 giving a total of 254 machines sharing the same public ip address. My router assigns those local ip addresses dynamically, but I can reserve an address for a particular machine, so it always gets the same one.

As far as dns goes. My router is set to automatically get the dns info from my ISP. I would leave it at that for now until you have your website going. You can then look into it in more detail.

Last edited by simcox1; 11-04-2005 at 05:16 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ftp(through web site access to ftp server) kelper Linux - Software 4 07-03-2015 06:14 PM
setup mailserver/web server/ftp server hariiyer Linux - Networking 1 11-27-2004 02:16 AM
Suddenly unable to connect to my web server and my ftp server. HELP! Silly22 Linux - Software 4 05-23-2004 05:42 PM
Setup a linux server, DNS, WEB, FTP, and Mail Server Help watermelon_lee Linux - Networking 1 08-26-2003 04:09 AM
what about ftp and web server Fuel Slackware 1 04-17-2002 10:25 AM


All times are GMT -5. The time now is 02:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration