troubleshooting Question

can't connect to server from within LAN

Avatar of BAJ05
BAJ05Flag for France asked on
Linux Networking
3 Comments1 Solution311 ViewsLast Modified:
I posted the following in the postgresql section but I believe now this is more related to networking issues since I can't connect to the server via http as well from within the LAN.
I read a little bit on VirtualHost in httpd but I am lost there, too.

Here is my httpd.conf:

ServerTokens OS

ServerRoot "/etc/httpd"

PidFile "/var/run/"

TimeOut 300

KeepAlive on

MaxKeepAliveRequests 100

KeepAliveTimeout 15

<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
MaxClients 150
MaxRequestsPerChild 100

<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0

Listen *:80

LoadModule access_module modules/
LoadModule auth_module modules/
LoadModule auth_anon_module modules/
LoadModule auth_dbm_module modules/
LoadModule auth_digest_module modules/
LoadModule ldap_module modules/
LoadModule auth_ldap_module modules/
LoadModule include_module modules/
LoadModule log_config_module modules/
LoadModule env_module modules/
LoadModule mime_magic_module modules/
LoadModule cern_meta_module modules/
LoadModule expires_module modules/
LoadModule deflate_module modules/
LoadModule headers_module modules/
LoadModule usertrack_module modules/
LoadModule unique_id_module modules/
LoadModule setenvif_module modules/
LoadModule mime_module modules/
LoadModule dav_module modules/
LoadModule status_module modules/
LoadModule autoindex_module modules/
LoadModule asis_module modules/
LoadModule info_module modules/
LoadModule dav_fs_module modules/
LoadModule vhost_alias_module modules/
LoadModule negotiation_module modules/
LoadModule dir_module modules/
LoadModule imap_module modules/
LoadModule actions_module modules/
LoadModule speling_module modules/
LoadModule userdir_module modules/
LoadModule alias_module modules/
LoadModule rewrite_module modules/
LoadModule proxy_module modules/
LoadModule proxy_ftp_module modules/
LoadModule proxy_http_module modules/
LoadModule proxy_connect_module modules/
LoadModule cache_module modules/
LoadModule suexec_module modules/
LoadModule disk_cache_module modules/
LoadModule file_cache_module modules/
LoadModule mem_cache_module modules/
LoadModule cgi_module modules/

Include conf.d/*.conf

User apache
Group apache

ServerAdmin root@localhost


UseCanonicalName on

DocumentRoot "/var/www/html"

<LocationMatch "^/$">
    Options -Indexes
    ErrorDocument 403 /error/noindex.html

<IfModule mod_userdir.c>
    # UserDir is disabled by default since it can confirm the presence
    # of a username on the system (depending on home directory
    # permissions).
    UserDir "disable"

    # To enable requests to /~user/ to serve the user's public_html
    # directory, use this directive instead of "UserDir disable":
    #UserDir public_html



AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all

TypesConfig "/etc/mime.types"

DefaultType text/plain

<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic

HostNameLookups Off

EnableMMAP off

EnableSendfile off

ErrorLog "/var/log/httpd/error_log"

LogLevel notice

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

CustomLog logs/access_log combined

ServerSignature on

Alias /icons/ "/var/www/icons/"

<IfModule mod_dav_fs.c>
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<IfModule mod_cgid.c>

IndexOptions FancyIndexing VersionSort NameWidth=*

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif

ReadmeName README.html
HeaderName HEADER.html

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

AddEncoding x-compress Z
AddEncoding x-gzip gz tgz

AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .et
AddLanguage fr .fr
AddLanguage de .de
AddLanguage he .he
AddLanguage el .el
AddLanguage it .it
AddLanguage ja .ja
AddLanguage pl .po
AddLanguage kr .kr
AddLanguage pt .pt
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pt-br .pt-br
AddLanguage ltz .ltz
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .se
AddLanguage cz .cz
AddLanguage ru .ru
AddLanguage tw .tw
AddLanguage zh-tw .tw
AddLanguage hr .hr

LanguagePriority en de nl et fr da el it ja kr no pl pt pt-br ltz ca es sv tw

ForceLanguagePriority Prefer Fallback

AddDefaultCharset ISO-8859-1

AddCharset ISO-8859-1  .iso8859-1  .latin1
AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
AddCharset ISO-8859-3  .iso8859-3  .latin3
AddCharset ISO-8859-4  .iso8859-4  .latin4
AddCharset ISO-8859-5  .iso8859-5  .latin5 .cyr .iso-ru
AddCharset ISO-8859-6  .iso8859-6  .latin6 .arb
AddCharset ISO-8859-7  .iso8859-7  .latin7 .grk
AddCharset ISO-8859-8  .iso8859-8  .latin8 .heb
AddCharset ISO-8859-9  .iso8859-9  .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5        .Big5       .big5
AddCharset WINDOWS-1251 .cp-1251   .win-1251
AddCharset CP866       .cp866
AddCharset KOI8-r      .koi8-r .koi8-ru
AddCharset KOI8-ru     .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8       .utf8

AddCharset GB2312      .gb2312 .gb
AddCharset utf-7       .utf7
AddCharset utf-8       .utf8
AddCharset big5        .big5 .b5
AddCharset EUC-TW      .euc-tw
AddCharset EUC-JP      .euc-jp
AddCharset EUC-KR      .euc-kr
AddCharset shift_jis   .sjis

AddType application/x-tar .tgz

AddHandler imap-file map

AddHandler type-map var

AddOutputFilter INCLUDES .shtml

Alias /error/ "/var/www/error/"

BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully

LockFile "/var/lock/httpd.lock"
CoreDumpDirectory "/etc/httpd"


<VirtualHost *>
        ServerSignature email
        DirectoryIndex  index.php index.html index.htm index.shtml
        LogLevel  warn
        HostNameLookups off

<Directory "/">
        Options FollowSymLinks
        AllowOverride None

<Directory "/var/www/html">
        Options Indexes Includes FollowSymLinks
        AllowOverride None
        Allow from all
        Order allow,deny

<Directory "/var/www/icons">
        Options Indexes MultiViews
        AllowOverride None
        Allow from all
        Order allow,deny

<Directory "/var/www/cgi-bin">
        Options ExecCGI
        AllowOverride None
        Allow from all
        Order allow,deny
Include /OME/conf/httpd.ome.conf

Request in postgresql group:

Request: I need help accessing my postgres database from another computer outside of my router

I have postgresql 7.4 running on FC4
I have two computers behind a router that are in the 192.168.0.x ip address space, one is the postgresql server ( and the other one we can call client  (
The IP address for the router is lets say:
using pgAdminIII I can access template1 from the client using the address.
I cannot do this using the address (all same parameters otherwise) from the client = PROBLEM
etherreal tells me that there is a request coming from the client on port 5432 (postgres) from
When I try to connect from a totally different computer I have no problem accessing it.
Then what might be of interest is also the router configuration. Here is the port forwarding table:
22, 22389-3399, 80, 5000-7000, 111,139, 443 ->

I basically know nothing about postgresql, so please explain in detail what I have to do to give you missing information.

The above tells me that postgres is running and working. I can access the database from outside, and a request is patched through the router to the server. Since ethereal sees the request it shouldn't be a firewall issue or something alike. To me the only solution lies in the configuration of postgres. As far as I know the only place to configure the server is through the pg_hba.conf file that lies in /var/lib/pgsql/data.

Here is mine (I played around with it and wanted to open up everything just to get it work and then slowly close it again.

# IPv4-style local connections:
host    all         all   md5
host    all         all                      md5
host    all         all        md5
host    all         all                       md5
# IPv6-style local connections:
#host    all         all         ::1               ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff        trust

#local  all    all           ident sameuser
local all all md5

pg_ident.conf is empty

and here is my postgresql.conf file (only parts without #)

tcpip_socket = true
max_connections = 100
port = 5432
authentication_timeout = 60     # 1-600, in seconds
password_encryption = true
shared_buffers = 1000           # min 16, at least max_connections*2, 8KB each
lc_messages = 'en_US.UTF-8'             # locale for system error message strings
lc_monetary = 'en_US.UTF-8'             # locale for monetary formatting
lc_numeric = 'en_US.UTF-8'              # locale for number formatting
lc_time = 'en_US.UTF-8'                 # locale for time formatting

Thanks for your kind help

David Piniella

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros