View previous topic :: View next topic |
Author |
Message |
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Sun Feb 26, 2006 4:12 am Post subject: Cant access server on LAN (Linux) |
|
|
I've ran the free version of Abyss on my Windos computers, it worked fine on my lan. But, recently i purchased x2 and i'm running it on my Linux server. I cant access it from my lan like I was able to do with the free version on other computers. I've tried different ports, sometimes it gets "Listen Error", so i change the port to 8080 or do the autodetect. Then it doesnt say Listen error but i still cant access it on my lan.
Neither can i access it from 127.0.0.1:8080 or localhost:8080 (on the webserver computer)
Also, i was wondering, does it matter what i put in the "hostname" field? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sun Feb 26, 2006 2:35 pm Post subject: Re: Cant access server on LAN (Linux) |
|
|
rrinc wrote: | I've ran the free version of Abyss on my Windos computers, it worked fine on my lan. But, recently i purchased x2 and i'm running it on my Linux server. I cant access it from my lan like I was able to do with the free version on other computers. I've tried different ports, sometimes it gets "Listen Error", so i change the port to 8080 or do the autodetect. Then it doesnt say Listen error but i still cant access it on my lan.
Neither can i access it from 127.0.0.1:8080 or localhost:8080 (on the webserver computer) |
On Unix systems (including Linux), only the root user has the right to use ports < 1024. That's why using port 80 from your normal user account leads to an error.
We recommend reading the following guide to know how to set Abyss to be run by root, to use a port < 1024, and to be run automatically upon startup:
When abyssws is run from the root account, it "takes" the privileged port (<1024) and it immediately switches to a less privileged account (the System User account as configured in Console > Server Conf. > General > Advanced Parameter> ) for security reasons. In the following, we explain how to do to fix the permissions:
* Login as root
* cd to your abyssws directory.
* Execute:
chown root abyssws
then:
chmod +Xs abyssws
This will change the owner of the executable file abyssws to root and will set its setuid bit. The setuid bit is useful since any user will be able to run abyssws as if it was root (and can use ports below 1024).
* That's it. log off from your root account.
Now, start abyssws as you used to do (using a non-root user account).
If you want to have Abyss Web Server run automatically at startup time, you should edit the rc.local file in /etc/rc.d and add the line:
/[path to abyss web server]/abyssws -d
where [path to abyss web server] should be replaced by the path where you installed the software. The -d switch instructs Abyss Web Server to run as a daemon (a system service.) Notice that when doing so, the server implicitly runs as root (since root is the only active user during system startup).
When running as root, Abyss can use ports < 1024. So you can log to the
console and change Abyss port to 80.
Quote: | Also, i was wondering, does it matter what i put in the "hostname" field? |
Yes, the hostname is important in X2. If it is not set, the host has no name and will work exactly as in X1. If it is set, the hostname must be associated with your IP address (whether local or global).
Below is a small tutorial explaining how to declare a new host and how associate it with a domain name. It explains also how to access it and test it locally.
* Create a directory in your hard drive where the files of the site should to be stored. In this example, we'll assume that you will create a new directory called website1 inside /home/abyssws/sites .
* In Abyss Web Server console, press Add in the Hosts table.
* Enter 80 in the port field.
* Enter the name of the new host in the Host name field (for example
www.myhost.com ).
www.myhost.com must be a valid registered domain name. Using your registrar tools, you should configure it to (A record) point to your computer's IP address (for example 111.112.113.114). You don't need to have your DNS server for this. Your registrar usually offers this service for you when buying the domain names. If it doesn't, there are some companies that provide the same service such as http://www.zoneedit.com (free for 5 domain names). If your IP changes frequently, you can use the services of a dynamic DNS services which takes care of IP changes and automatically updates your DNS configuration. You can also use a free domain name such those provided by No-IP or DynDNS.
You should also ensure that your firewall (if you have one) accepts
connections made to port 80. You should also configure your router to
forward connections made to its external port 80 to the port 80 of the
computer where Abyss Web Server is running. This is called port forwarding
and the detailed steps to do that are explained in
http://www.portforward.com (choose your router brand/model there for the
exact instructions).
* Enter /home/abyssws/sites/website1 in Documents Path (or press Browse and locate the directory where the files of the site are.)
* Enter for example log/website1.log in Log File
* Select the configuration you want to duplicate for the current host in "Copy Configuration From". If you want to start with the default parameters, select Default configuration.
Press OK. The new host will be created. All you have to do now is to put the site files in /home/abyssws/sites/website1 (using your favorite file manager or FTP.) Do not forget to start the new host (press Start in its corresponding row in the Hosts table.)
Now to see if it works, use an external site such as http://www.proxify.com (you can find a more extensive list of sites providing proxying service in <http://directory.google.com/Top/Computers/Internet/Proxying_and_Filtering/Hosted_Proxy_Services/Free/CGI_Proxy/> ) to test if http://www.myhost.com is accessible from the rest of the Internet. Notice that you cannot test it locally as most routers doesn't know how to do loopback.
To test your site locally using its domain name, we suggest using this tip:
For example, let's say you want to test the host http://www.myhost.com
locally. In the computer where you used to browse http://127.0.0.1 to get
the web site (which doesn't work anymore since the host has a name), open with any text editor the file /etc/hosts (you must be root to change it) and add for each of your hosts at the end of that file a line of the form:
127.0.0.1 www.mysite.com
You can also add another line for another host name if you want:
127.0.0.1 www.mysecondsite.com
Save the file and browse http://www.mysite.com locally . You should see
the web site.
This file act like a local domain names database. The system does a lookup in it before contacting an external DNS server to resolve the domain name requested in the browser. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Sun Feb 26, 2006 4:18 pm Post subject: |
|
|
Thanks!
You might want to put all of that information on a webpage on your website.
-Blake |
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Mon Feb 27, 2006 12:25 am Post subject: Still doesnt work |
|
|
This sucks:
It still doesnt work, cant access the webserver on my lan.
I'm using port 80 (abyss has root access).
I set the hostname to www.randomresources.com.
I have at my control panel at the place i registered the domain, the option to redirect to my IP address (70.252.78.110:80).
I cant think of anything to do to get it working.
I've tried accessing te computer from other computers in my lan with its lan ip (192.168.1.4:80)
Any insight? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Mon Feb 27, 2006 11:03 am Post subject: Re: Still doesnt work |
|
|
rrinc wrote: | This sucks:
It still doesnt work, cant access the webserver on my lan.
I'm using port 80 (abyss has root access).
I set the hostname to www.randomresources.com.
I have at my control panel at the place i registered the domain, the option to redirect to my IP address (70.252.78.110:80).
I cant think of anything to do to get it working.
I've tried accessing te computer from other computers in my lan with its lan ip (192.168.1.4:80)
Any insight? |
You cannot access a host with its IP only when it is declared inside Abyss Web Server as having a host name. So http://192.168.1.4 from inside your LAN won't be valid to access a host on 192.168.1.4 which is bound to a specific host name (how can the server guess which host you're actually wanting to access if there is no name)?
So to locally access www.randomresources.com which is hosted on 192.168.1.4 you'll have to trick your computer (the computer on which you want to browse www.randomresources.com, not the computer on which Abyss Web Server runs) and make it think there is a domain name called www.randomresources.com which points to 192.168.1.4.
So on the computer where you want to browse 192.168.1.4, open with any text editor the file:
/etc/hosts (you must be root to change it) if you are on a Unix system,
or
C:\WINNT\system32\drivers\etc\hosts (if you are using Windows NT, 2000, or XP Pro)
or
C:\WINDOWS\system32\drivers\etc\hosts (if you are using Windows XP Home or 2003)
or
C:\WINDOWS\hosts (if you are using Windows 95,98, or ME)
and add for each of your hosts at the end of that file a line of the form:
192.168.1.4 www.randomresources.com
You can also add another line for another host name if you want:
192.168.1.4 www.secondsite.com
Save the file and browse http://www.randomresources.com locally . You should see the web site.
This file act like a local domain names database. The system does a lookup in it before contacting an external DNS server to resolve the domain name requested in the browser.
Note that the problem you faced is related to your network setup and not to the web server. Your local computers must have the correct domain name-local IP address list in order to access virtual hosts hosted locally on any web server software. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Tue Feb 28, 2006 3:37 am Post subject: |
|
|
Do i need to add the port to the ip in the hosts file (on my windows machine). I have it already set up on the server. I still cant access my server (even through a proxy) from the internet. I've tried my ip with port 80 added to the end (70.252.78.110:80). And I cant get it to work. I need to be able to at least access it from the internet so I can set my domain name up with my IP.
Should I e-mail my configuration file to you?
What is the chance that my ISP blocks port 80? (i dont think thats the problem, but my ISP is SBC).
I dont think this will help you, but here's alot of my network info:
I have a Netgear WGU624 router.
My Server's internal IP is 192.168.1.4
I'm using port 80 (port forwarding is also configured with that port to the server's lan ip)
My external ip is 70.252.78.110
My ISP is SBC
I cant think of anything else that could help. (I know almost everything about my network, so ask if necessary). |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Feb 28, 2006 11:33 am Post subject: |
|
|
rrinc wrote: | Do i need to add the port to the ip in the hosts file (on my windows machine). |
No the hosts file should only contain domain-IP mappings. No ports should be added.
Quote: | I have it already set up on the server. I still cant access my server (even through a proxy) from the internet. I've tried my ip with port 80 added to the end (70.252.78.110:80). And I cant get it to work. I need to be able to at least access it from the internet so I can set my domain name up with my IP.
Should I e-mail my configuration file to you? |
Please email it to our priority support email. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Tue Feb 28, 2006 10:37 pm Post subject: |
|
|
I emailed abyss.conf. |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed Mar 01, 2006 4:55 pm Post subject: |
|
|
rrinc wrote: | I emailed abyss.conf. |
Your host has a name www.randomresources.com. But the domain name www.randomresources.com seems to not associated with your IP address.
So visitors outside your network who try to browse www.randomresources.com won't get access the site hosted by your server.
And since the host has a name, you cannot only use your external IP to access it.
So you have two solutions:
* Either remove the host name (In the console, press Configure for the Host "www.randomresources.com", select General, then click on the trash icon in front of www.randomresources.com to delete it. Validate by pressing OK and restart. The host will be called Default Host on Port 80 and will accept the external IP accesses.
* The second solution is to associate www.randomresources.com with your external IP. To do so you'll have to log on your domain name account (it is usually on your domain registrar site) and associate the A record of www.randomresources.com to with your external IP. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
Mushroom63 -
Joined: 21 Nov 2005 Posts: 2
|
Posted: Mon Mar 13, 2006 6:33 pm Post subject: |
|
|
Hi, I found this thread and followed the following instructions:
* Login as root
* cd to your abyssws directory.
* Execute:
chown root abyssws
then:
chmod +Xs abyssws
and am still unable to listen on ports <1024
Any suggestions as to what I might be doing wrong?
Paul |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Mar 14, 2006 10:52 am Post subject: |
|
|
Mushroom63,
Are you able to use ports < 1024 if you launch Abyss Web Server from your root account? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
Mushroom63 -
Joined: 21 Nov 2005 Posts: 2
|
Posted: Tue Mar 14, 2006 1:02 pm Post subject: |
|
|
Hi,
Very sorry, as usual the fault was between the keyboard and the chair.
My firewall was set up in a very silly way. I have now solved the problem
Paul |
|
Back to top |
|
|
|