Re: Cannot change Apache2 ServerName/ServerAlias
On Tue, Feb 07, 2006 at 02:27:28PM -0500, Yu,Glen [Ontario] wrote: > Yes, ServerName and ServerAlias are on separate lines in the config file as > well as everything you've mentioned below (including the /etc/hosts). > > The error the browser is giving me is: > > Cannot find page (or something similar) with IE (on the off chance that it > was a browser problem) OK, are you trying to access the server from outside? What I mean is that first you should make sure, that the configuration works locally. I.e. point your browser locally to http://server/ and to http://newpagename/. Of course you need to have the index.htm or index.html in the DocumentRoot directory. If you try access the server from LAN, the server and the alias name need to be in your hosts file in the host from where you are trying to access the http://server/ or http://alias/. If you are using DNS, then you need to have records for both the server and the alias. > and > > Using Firefox 1.5.0.1: Google telling me that "Your search - newpagename - > did not match any documents" I'm a little confused. Why do you try find the site with Google? First of all, it takes a while, before Google finds your site. Secondly Google doesn't know about the alias name of your site, it only searches the contents of the pages in your server. For information on how to make your site show up in the Google results, see the Webmaster basics in the Google site. Simo -- :r ~/.signature signature.asc Description: Digital signature
RE: Cannot change Apache2 ServerName/ServerAlias
Yes, ServerName and ServerAlias are on separate lines in the config file as well as everything you've mentioned below (including the /etc/hosts). The error the browser is giving me is: Cannot find page (or something similar) with IE (on the off chance that it was a browser problem) and Using Firefox 1.5.0.1: Google telling me that "Your search - newpagename - did not match any documents" Glen -Original Message- From: Simo Kauppi [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 07, 2006 2:03 PM To: debian-user@lists.debian.org Subject: Re: Cannot change Apache2 ServerName/ServerAlias On Tue, Feb 07, 2006 at 12:08:19PM -0500, Yu,Glen [Ontario] wrote: > I'm still having trouble trying to access my page through an alias > > Here's what I've fixed/done so far: > 1) changed ServerName http://server to ServerName server > 2) used the a2ensite tool to enable the site Did you restart apache2? > As for /etc/hosts, I already had the following in it: > 127.0.0.1 localhost.localdomain localhost > 123.45.678.901hostname.domainname hostname aliasname > > Am I suppose to have them in 2 separate lines? > i.e. > 127.0.0.1 localhost.localdomain localhost > 123.45.678.901hostname.domainname hostname > 123.45.678.901hostname.domainname aliasname No, they should be on the same line. I.e if you have ServerName server ServerAlias newpagename in your virtual host, then you also have 123.45.678.901 hostname.domainname server newpagename in your /etc/hosts file. What is the actual error you get when you try to browse the site with the alias? > Also, I do plan to have more vhosts running after I figure apache2 (running > on Debian 3.1) out. > > Thanks in advance! > > Regards, > -Glen > > -Original Message- > From: Antonio Ognio [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 07, 2006 11:28 AM > To: debian-user@lists.debian.org > Subject: Re: Cannot change Apache2 ServerName/ServerAlias > > > El Mon, 06-02-2006 a las 16:47 -0500, Yu,Glen [Ontario] escribió: > > I'm having trouble changing the ServerName & ServerAlias to look up my page. > > Have you addded a line in /etc/hosts to point newpagename to your IP > address? > > If you intend to have only one page there by far the simplest way is not > mess with VirtualHost setup and just let the main configuration serve > pages from your main DocumentRoot no matter with IP address or host name > the cliet (e.g. browser) reach you by. > > Hope that helps, > > Antonio. Simo -- :r ~/.signature
Re: Cannot change Apache2 ServerName/ServerAlias
On Tue, Feb 07, 2006 at 12:08:19PM -0500, Yu,Glen [Ontario] wrote: > I'm still having trouble trying to access my page through an alias > > Here's what I've fixed/done so far: > 1) changed ServerName http://server to ServerName server > 2) used the a2ensite tool to enable the site Did you restart apache2? > As for /etc/hosts, I already had the following in it: > 127.0.0.1 localhost.localdomain localhost > 123.45.678.901hostname.domainname hostname aliasname > > Am I suppose to have them in 2 separate lines? > i.e. > 127.0.0.1 localhost.localdomain localhost > 123.45.678.901hostname.domainname hostname > 123.45.678.901hostname.domainname aliasname No, they should be on the same line. I.e if you have ServerName server ServerAlias newpagename in your virtual host, then you also have 123.45.678.901 hostname.domainname server newpagename in your /etc/hosts file. What is the actual error you get when you try to browse the site with the alias? > Also, I do plan to have more vhosts running after I figure apache2 (running > on Debian 3.1) out. > > Thanks in advance! > > Regards, > -Glen > > -Original Message- > From: Antonio Ognio [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 07, 2006 11:28 AM > To: debian-user@lists.debian.org > Subject: Re: Cannot change Apache2 ServerName/ServerAlias > > > El Mon, 06-02-2006 a las 16:47 -0500, Yu,Glen [Ontario] escribió: > > I'm having trouble changing the ServerName & ServerAlias to look up my page. > > Have you addded a line in /etc/hosts to point newpagename to your IP > address? > > If you intend to have only one page there by far the simplest way is not > mess with VirtualHost setup and just let the main configuration serve > pages from your main DocumentRoot no matter with IP address or host name > the cliet (e.g. browser) reach you by. > > Hope that helps, > > Antonio. Simo -- :r ~/.signature signature.asc Description: Digital signature
RE: Cannot change Apache2 ServerName/ServerAlias
I'm still having trouble trying to access my page through an alias Here's what I've fixed/done so far: 1) changed ServerName http://server to ServerName server 2) used the a2ensite tool to enable the site As for /etc/hosts, I already had the following in it: 127.0.0.1 localhost.localdomain localhost 123.45.678.901 hostname.domainname hostname aliasname Am I suppose to have them in 2 separate lines? i.e. 127.0.0.1 localhost.localdomain localhost 123.45.678.901 hostname.domainname hostname 123.45.678.901 hostname.domainname aliasname Also, I do plan to have more vhosts running after I figure apache2 (running on Debian 3.1) out. Thanks in advance! Regards, -Glen -Original Message- From: Antonio Ognio [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 07, 2006 11:28 AM To: debian-user@lists.debian.org Subject: Re: Cannot change Apache2 ServerName/ServerAlias El Mon, 06-02-2006 a las 16:47 -0500, Yu,Glen [Ontario] escribió: > I'm having trouble changing the ServerName & ServerAlias to look up my page. Have you addded a line in /etc/hosts to point newpagename to your IP address? If you intend to have only one page there by far the simplest way is not mess with VirtualHost setup and just let the main configuration serve pages from your main DocumentRoot no matter with IP address or host name the cliet (e.g. browser) reach you by. Hope that helps, Antonio. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Cannot change Apache2 ServerName/ServerAlias
El Mon, 06-02-2006 a las 16:47 -0500, Yu,Glen [Ontario] escribió: > I'm having trouble changing the ServerName & ServerAlias to look up my page. Have you addded a line in /etc/hosts to point newpagename to your IP address? If you intend to have only one page there by far the simplest way is not mess with VirtualHost setup and just let the main configuration serve pages from your main DocumentRoot no matter with IP address or host name the cliet (e.g. browser) reach you by. Hope that helps, Antonio. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Cannot change Apache2 ServerName/ServerAlias
On Mon, Feb 06, 2006 at 04:47:26PM -0500, Yu,Glen [Ontario] wrote: > I'm having trouble changing the ServerName & ServerAlias to look up my page. > > I'm running Debian 3.1 with 2.4.x kernel on an old Dell laptop, however, I > can only access my page via http://server but not as something else (i.e. > http://newpagename). This is what I have at the moment inside > /etc/apache2/sites-available/default (I simply changed DocumentRoot, > commented out RedirectMatch ~/$ /apache2-default, and added in ServerName > server and ServerAlias newpagename: [snip] > Regards, > -Glen > I forgot to mention, that you also need to enable your site by creating a symlink to /etc/apache2/sites-enabled either manually or with the a2ensite tool. And of course restart apache2 after the changes :) Simo -- :r ~/.signature signature.asc Description: Digital signature
Re: Cannot change Apache2 ServerName/ServerAlias
On Mon, Feb 06, 2006 at 04:47:26PM -0500, Yu,Glen [Ontario] wrote: > I'm having trouble changing the ServerName & ServerAlias to look up my page. > > I'm running Debian 3.1 with 2.4.x kernel on an old Dell laptop, however, I > can only access my page via http://server but not as something else (i.e. > http://newpagename). This is what I have at the moment inside > /etc/apache2/sites-available/default (I simply changed DocumentRoot, > commented out RedirectMatch ~/$ /apache2-default, and added in ServerName > server and ServerAlias newpagename: You also need to have newpagename as one of your host names. In your /etc/hosts you need to have something like: 10.0.0.1 server newpagename > NameVirtualHost * > > ServerAdmin [EMAIL PROTECTED] > > # DocumentRoot /var/www/ > DocumentRoot /home/glen/webdir > > Options FollowSymLinks > AllowOverride None > > Since you changed the document root, this directory directive is not really related to your new location. If you want to set options for your new document root, you need . Of course the options from the main configuration file /etc/apache2/apache2.conf for apply to /home/glen/webdir, so you may want to check those as well. > Options Indexes FollowSymLinks MultiViews > AllowOverride None > Order allow,deny > allow from all > # This directive allows us to have apache2's default start > page > # in /apache2-default/, but still have / go to the right place > # RedirectMatch ^/$ /apache2-default/ > > > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ > > AllowOverride None > Options ExecCGI -MultiViews +SymLinksIfOwnerMatch > Order allow,deny > Allow from all > > > ErrorLog /var/log/apache2/error.log > # Possible values include: debug, info, notice, warn, error, crit, > # alert, emerg. > LogLevel warn > > CustomLog /var/log/apache2/access.log combined > ServerSignature On > > Alias /doc/ "/usr/share/doc/" > > Options Indexes MultiViews FollowSymLinks > AllowOverride None > Order deny,allow > Deny from all > Allow from 127.0.0.0/255.0.0.0 ::1/128 > > >ServerName http://server >ServerAlias newpagename > > > > > Regards, > -Glen Like somebody already commented, the http://server is not a valid ServerName. HTH Simo -- :r ~/.signature signature.asc Description: Digital signature
Re: Cannot change Apache2 ServerName/ServerAlias
On 06/02/06, Yu,Glen [Ontario] <[EMAIL PROTECTED]> wrote: > I'm having trouble changing the ServerName & ServerAlias to look up my page. > > I'm running Debian 3.1 with 2.4.x kernel on an old Dell laptop, however, I > can only access my page via http://server but not as something else (i.e. > http://newpagename). This is what I have at the moment inside > /etc/apache2/sites-available/default (I simply changed DocumentRoot, > commented out RedirectMatch ~/$ /apache2-default, and added in ServerName > server and ServerAlias newpagename: > [snip] >ServerName http://server >ServerAlias newpagename > > ServerName should only be a name, ie 'server'. http://server is invalid. you can use: apache2ctl configtest to verify your config after making changes. -- ~ Darryl ~ [EMAIL PROTECTED] ~ http://darrylclarke.com
Cannot change Apache2 ServerName/ServerAlias
I'm having trouble changing the ServerName & ServerAlias to look up my page. I'm running Debian 3.1 with 2.4.x kernel on an old Dell laptop, however, I can only access my page via http://server but not as something else (i.e. http://newpagename). This is what I have at the moment inside /etc/apache2/sites-available/default (I simply changed DocumentRoot, commented out RedirectMatch ~/$ /apache2-default, and added in ServerName server and ServerAlias newpagename: NameVirtualHost * ServerAdmin [EMAIL PROTECTED] # DocumentRoot /var/www/ DocumentRoot /home/glen/webdir Options FollowSymLinks AllowOverride None Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all # This directive allows us to have apache2's default start page # in /apache2-default/, but still have / go to the right place # RedirectMatch ^/$ /apache2-default/ ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature On Alias /doc/ "/usr/share/doc/" Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 ServerName http://server ServerAlias newpagename Regards, -Glen