View previous topic :: View next topic |
Author |
Message |
steve_d555 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/47717210241a3bf7bdfc04.gif)
Joined: 07 Nov 2004 Posts: 458 Location: Belmont, Massachusetts
|
Posted: Mon Jan 24, 2005 7:03 pm Post subject: Apache2, VHosts, and the Outside World |
|
|
Hi,
I just bought a domain name: bla.net and was looking to host it on my own webserver, so I installed apache,php,mysql and all and that worked beautifully. Right now I am behind a router trying to erver off port 92 (which is open), but whenever my friends try to connect to http://bla.net:92 they cannot, but if they try my IP address 159.199.58.xxx:92 it works perfectly.
But last night it was working perfectly, so what changed?
VHosts are included in apache2.conf (bad?)
Here are my apache2.conf, /etc/hosts files.
Quote: |
### /etc/apache2/conf/apache2.conf
### $Id: apache2.conf,v 1.1 2004/03/22 21:17:57 stuart Exp $
###
### Main Configuration Section
### You really shouldn't change these settings unless you're a guru
###
ServerRoot /usr/lib/apache2
ServerName bla.net
#LockFile /etc/apache2/apache2.lock
PidFile /var/run/apache2.pid
ErrorLog logs/error_log
LogLevel warn
DocumentRoot /var/www/localhost/htdocs
NameVirtualHost *:92
<VirtualHost *:92>
ServerAdmin root@bla.net
DocumentRoot /var/www/localhost/htdocs/
ServerName bla.net
ServerAlias www
CustomLog /var/www/localhost/logs/access.log common
ErrorLog /var/www/localhost/logs/error.log
</VirtualHost>
### Dynamic Shared Object (DSO) Support
###
### You should always leave these three, as they are needed for normal use.
### mod_access (Order, Allow, etc..)
### mod_log_config (Transferlog, etc..)
### mod_mime (AddType, etc...)
###
LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule mime_module modules/mod_mime.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule cgid_module modules/mod_cgid.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
###
### New Modules for 2.0 (some are experimental)
###
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule echo_module modules/mod_echo.so
LoadModule charset_lite_module modules/mod_charset_lite.so
LoadModule cache_module modules/mod_cache.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule case_filter_module modules/mod_case_filter.so
LoadModule case_filter_in_module modules/mod_case_filter_in.so
LoadModule deflate_module modules/mod_deflate.so
#LoadModule optional_hook_export_module modules/mod_optional_hook_export.so
#LoadModule optional_hook_import_module modules/mod_optional_hook_import.so
#LoadModule optional_fn_import_module modules/mod_optional_fn_import.so
#LoadModule optional_fn_export_module modules/mod_optional_fn_export.so
#LoadModule bucketeer_module modules/mod_bucketeer.so
LoadModule logio_module modules/mod_logio.so
###
### Global Configuration
###
# Splitting up apache2.conf into two files makes it easier to support
# multiple configurations on the same serer. In commonapache2.conf
# you keep directives that apply to all implementations and in this
# file you keep server-specific directives. While we don't yet have
# multiple configurations out-of-the-box, this allows us to do that
# in the future easily. (PERLPROXIED *ahem*)
#
# For Apache2 we load all conf files in conf/modules.d
Include conf/modules.d/*.conf
Include conf/commonapache2.conf
###
### IP Address/Port
###
#BindAddress *
Listen 92
###
### Log configuration Section
###
<IfModule mod_log_config.c>
#Single logfile with access, agent and referer information
#This is the default, if vlogs are not defined for the main server
CustomLog logs/access_log combined env=!VLOG
#If VLOG is defined in conf/vhosts/vhosts.conf, we use this entry
#CustomLog "|/usr/sbin/apache2splitlogfile" vhost env=VLOG
</IfModule>
###
### Virtual Hosts
###
# We include different templates for Virtual Hosting. Have a look in the
# vhosts directory and modify to suit your needs.
#Include conf/vhosts/vhosts.conf
#Include conf/vhosts/dynamic-vhosts.conf
#Include conf/vhosts/virtual-homepages.conf
###
### Performance settings Section
###
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15
# prefork MPM [THIS IS THE DEFAULT]
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
# perchild MPM
# NumServers: constant number of server processes
# StartThreads: initial number of worker threads in each server process
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# MaxThreadsPerChild: maximum number of worker threads in each server process
# MaxRequestsPerChild: maximum number of connections per server process
<IfModule perchild.c>
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
</IfModule>
|
Quote: |
# /etc/hosts: This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server. Just add the names, addresses
# and any aliases to this file...
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04 20:12:25 azarah Exp $
#
127.0.0.1 gentoobox gentoobox.linuxdomain
#192.168.0.xxx www.bla.com bla.com
151.199.58.xxx bla.com www.bla.com
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
|
Nmap output:
Quote: |
/home/steve
[root@gentoobox] -> nmap -P0 -p 92 silentlink.com
Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2005-01-24 14:02 EST
Interesting ports on silentlink.com (151.199.58.xxx):
PORT STATE SERVICE
92/tcp open npp
Nmap run completed -- 1 IP address (1 host up) scanned in 0.015 seconds
|
Thank you,
Steve |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Chewi Developer
![Developer Developer](/images/ranks/rank-dev.gif)
![](images/avatars/1624839473f5374a5b1b71.gif)
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Mon Jan 24, 2005 7:20 pm Post subject: |
|
|
Why are you trying to use virtual hosts when you're only using one domain name? Do you intend to add more later on? Virtual host stuff should really go in /etc/apache2/conf/vhosts/vhosts.conf but I suppose that's not essential. Here's a very simplistic one that I've used.
Code: | NameVirtualHost *
<VirtualHost *>
ServerName ffaura.kicks-ass.net
DocumentRoot /var/www/www.ffaura.com/htdocs
</VirtualHost> |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
steve_d555 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/47717210241a3bf7bdfc04.gif)
Joined: 07 Nov 2004 Posts: 458 Location: Belmont, Massachusetts
|
Posted: Mon Jan 24, 2005 7:29 pm Post subject: |
|
|
Ok, I just removed the VirtualHost part, but my friend cant connect still, but my IP works great still. Anything else, I am doing wrong?
--Steve |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
lodder_ Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/32611700041c727d0ce2fc.gif)
Joined: 06 Nov 2004 Posts: 162 Location: Knokke-Heist, Belgium
|
Posted: Mon Jan 24, 2005 7:44 pm Post subject: |
|
|
if your running a router or a firewall try to open up the port 80 _________________ delodder.be |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Chewi Developer
![Developer Developer](/images/ranks/rank-dev.gif)
![](images/avatars/1624839473f5374a5b1b71.gif)
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Mon Jan 24, 2005 7:47 pm Post subject: |
|
|
Have you put bla.net in /etc/hosts? It should have something like this...
127.0.0.1 <your hostname> bla.net localhost |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
steve_d555 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/47717210241a3bf7bdfc04.gif)
Joined: 07 Nov 2004 Posts: 458 Location: Belmont, Massachusetts
|
Posted: Mon Jan 24, 2005 7:48 pm Post subject: |
|
|
Ok, but My ISP, Verizon, Blocks Port80 serving and im serving off Port92 anyway
edit: nope
--Steve |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
steve_d555 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/47717210241a3bf7bdfc04.gif)
Joined: 07 Nov 2004 Posts: 458 Location: Belmont, Massachusetts
|
Posted: Mon Jan 24, 2005 8:00 pm Post subject: |
|
|
Does not work still changed /etc/hosts/ :
Quote: |
127.0.0.1 localhost bla.net www.bla.net gentoobox gentoobox.linuxdomain
#151.199.58.1xx bla.net www.bla.net
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
|
Still works with IP tho
edit: using the link from inside my home network works though. (router settings?)
--Steve |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fdamstra n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Feb 2004 Posts: 39 Location: Grand Rapids, MI
|
Posted: Mon Jan 24, 2005 8:20 pm Post subject: |
|
|
steve_d555 wrote: | Ok, I just removed the VirtualHost part, but my friend cant connect still, but my IP works great still. Anything else, I am doing wrong? |
Are you sure you're not barking up the wrong tree here? Could it be that your DNS isn't resolving correctly? Have your friends ping 'www.bla.net' and make sure that the proper IP address comes up. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
steve_d555 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/47717210241a3bf7bdfc04.gif)
Joined: 07 Nov 2004 Posts: 458 Location: Belmont, Massachusetts
|
Posted: Mon Jan 24, 2005 8:35 pm Post subject: |
|
|
OK,
My friend cannot ping either www.bla.net nor bla.net, I tried it online with an online ping and it shows up as 64.202.167.129 which is not mine, but is the site of some sort of GoDaddy thing. My nameservers are:
PARK19.SECURESERVER.NET
PARK20.SECURESERVER.NET
Also I am hosting off port 92 because Verizon blocks port 80
--Steve |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Arainach l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/790512581428913078a53d.jpg)
Joined: 08 Jul 2004 Posts: 609
|
Posted: Mon Jan 24, 2005 9:03 pm Post subject: |
|
|
Try www.bla.net:92 - By default, a domain name resolves to port 80. I don't know enough about DNS to know if you can change that or not. _________________ Gentoo: Stage3 w/ NPTL & udev, gcc 3.4.4 full rebuild
Kernel: 2.6.15-gentoo-r1 w/ 1G-Lowmem Patch
System: Athlon XP 2.2Ghz/1GB Corsair Value/160GB, 250GB WD IDE/128MB GeForce 6800/Sony 17" Trinitron G200 @ 1280x1024x75Hz |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
steve_d555 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/47717210241a3bf7bdfc04.gif)
Joined: 07 Nov 2004 Posts: 458 Location: Belmont, Massachusetts
|
Posted: Mon Jan 24, 2005 9:05 pm Post subject: |
|
|
Ya, thats what Ive been telling my friends to do, but that doesnt work either.
--Steve |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fdamstra n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Feb 2004 Posts: 39 Location: Grand Rapids, MI
|
Posted: Mon Jan 24, 2005 9:26 pm Post subject: |
|
|
steve_d555 wrote: | OK,
My friend cannot ping either www.bla.net nor bla.net, I tried it online with an online ping and it shows up as 64.202.167.129 which is not mine, but is the site of some sort of GoDaddy thing. My nameservers are:
PARK19.SECURESERVER.NET
PARK20.SECURESERVER.NET
|
Your problems have absolutely nothing to do with your apache setup, nor your router or anything else local to you. The problem is that you haven't prepared DNS.
GoDaddy provides DNS services if you choose to use theirs. Sadly, I don't remember what their control panel looks like, but you need to log onto your account and make 'bla.net' and 'www.bla.net' resolve to the correct IP address. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
steve_d555 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/47717210241a3bf7bdfc04.gif)
Joined: 07 Nov 2004 Posts: 458 Location: Belmont, Massachusetts
|
Posted: Mon Jan 24, 2005 9:39 pm Post subject: |
|
|
Ok, I see now, It takes some time to change, right? It says it caches for an hour, so in an hour it should be changed, or is it short?
Relative newbie at webhosting sorry
--Steve |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
steve_d555 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/47717210241a3bf7bdfc04.gif)
Joined: 07 Nov 2004 Posts: 458 Location: Belmont, Massachusetts
|
Posted: Mon Jan 24, 2005 9:52 pm Post subject: |
|
|
Also, would it be better to use something like zoneedit for dns control?
--Steve |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fdamstra n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Feb 2004 Posts: 39 Location: Grand Rapids, MI
|
Posted: Mon Jan 24, 2005 9:59 pm Post subject: |
|
|
DNS propagation time depends on any number of factors, and is generally hard to predict. If the TTL is set for 1 hour (which is implied by your "Cacheing" statement above), then most internet users will be able to resolve the IP address within 1 hour. However, there are a number of DNS servers out that that ignore or improperly cache results, so it can take longer for certain users to see the changes.
I've never used ZoneEdit. If you're happy with GoDaddy's interface, I see no reason to change. If you need Dynamic DNS or one of the other services ZoneEdit provides, then maybe it's a good idea. And there are certainly many people who prefer to manage their own DNS servers. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
lyon n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 04 Aug 2004 Posts: 16
|
Posted: Tue Jan 25, 2005 5:11 am Post subject: |
|
|
Steve, I don't think that the park nameservers are going to do what you want. I ran into the same thing.
Have your friend try typing in the IP address you are on.
I set up my DNS with zoneedit and registed with GOdaddy
You deffinatly have a DNS issue tho. Sort that out and it should work.
Matt. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
steve_d555 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/47717210241a3bf7bdfc04.gif)
Joined: 07 Nov 2004 Posts: 458 Location: Belmont, Massachusetts
|
Posted: Tue Jan 25, 2005 6:02 am Post subject: |
|
|
Ya, I set up zoneedit about 5 hrs ago. It says it should take 24-48 hrs, but already on the dns lookup it has listed the zoneedit servers, but no IP Address(A), I still does not work so I'm guessing it will take some time. Anyway thanks for all you help.
--Steve |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
steve_d555 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/47717210241a3bf7bdfc04.gif)
Joined: 07 Nov 2004 Posts: 458 Location: Belmont, Massachusetts
|
Posted: Wed Jan 26, 2005 9:57 pm Post subject: |
|
|
Hi,
Me again, the http://www.bla.net:92 is working perfectly but is there anyway to get it so that my friends only have to type http://www.bla.net instead of including the port number? Port Redirection?
--Steve |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Chewi Developer
![Developer Developer](/images/ranks/rank-dev.gif)
![](images/avatars/1624839473f5374a5b1b71.gif)
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Wed Jan 26, 2005 10:09 pm Post subject: |
|
|
GoDaddy would have to provide a port redirection service. I don't know if it does. dyndns.org does. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
steve_d555 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/47717210241a3bf7bdfc04.gif)
Joined: 07 Nov 2004 Posts: 458 Location: Belmont, Massachusetts
|
Posted: Wed Jan 26, 2005 10:32 pm Post subject: |
|
|
Ok, nevermind I am using zoneedit and there is actually an FAQ entry that worked perfectly, thank you for all your great help guys.
--Steve |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|