Forum Moderators: phranque

Message Too Old, No Replies

www.abc.com versus abc.com

         

Montezuma45

6:39 am on Feb 18, 2011 (gmt 0)

10+ Year Member



I'm resetting up my 2nd server but the old server is running old versions and I can't just copy and paste.

I've been working on the DNS server section for a few days. It would have been faster had I used abc.com instead of www.abc.com

Now I have both of the conditions right (I think). I have static IP's and abc.com is a virtual host.

The next step is to add www.abc.com/rock

Now I'm getting:

Forbidden

You don't have permission to access /rock on this server.

I tried to follow the same idea as the old server.

In /etc/apache2/modules.d/00_default_setting.conf, I have:

alias /rock /var/www/rock
<Directory "/var/www/rock">
Options -All -Multiviews
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>


What am I doing wrong?

jdMorgan

5:25 pm on Feb 18, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check the file permissions on /rock and make sure that it exists as a physical file (named "rock" in your DocumentRoot directory). Because you've turned off directory indexes (Options -All) your server won't map (for example) /rock to /rock/ to /rock/index.html (or whatever). So you must have a physical file named "rock" that is world-readable or you'll get an error.

Note that this requirement conflicts with your use of /rock as a directory-path, so I suspect that you simply have not defined a DirectoryIndex in /rock/, and that your Options are set too tight for your actual requirements.

Make the /rock directory world-readable, add a world-readable index file, and declare it using DirectoryIndex. Alternately, set Options +Indexes to allow the server to generate a directory listing for the subdirectory "/rock" -- depends on what you want to do here.

Also, not sure why you need that Alias directive if your DocumentRoot is set correctly...

Jim

Montezuma45

10:54 pm on Feb 18, 2011 (gmt 0)

10+ Year Member



Basically, my step-son set up the first server for me. I'm using his 6+ year old code to use on the new server with the assumption that it worked before and it should still work. Bad assumption since everything has changed from back then. Apache now has the module.d & vhost.d which weren't there before. Bind has changed, ....

I'm willing to change the way things are to what they should be but I don't know what to ask for.

I have 4 vhost, www.abc.com, www.aaa.com, www.bbb.com & www.ccc.com.

aaa.com, bbb.com, ccc.com are all self contained sites, everything they need is under one directory name ?.com

abc.com is going to be a family/special use site. The site will have links within the main page to other sites (abc.com/photos, ...) for the outsider to the site to go to. Other sections will have to be typed in e.g., [abc.com...]

If you can show me examples on this, I'll try to do it according to Hoyle.

Thanks

jdMorgan

11:29 pm on Feb 18, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hoyle: [httpd.apache.org...]

Jim

Montezuma45

4:16 pm on Feb 19, 2011 (gmt 0)

10+ Year Member



I was looking on the web for more info but I think I'm using the wrong terminology.

mail.abc.com is a subdomain (from the descriptions I've read).

If I'm using it within a web site, www.abc.com/product or www.abc.com/contacts, it would still be part of the actual web page.

What would the term be for www.abc.com/rock be (as I'm intending to use it), since it is a separate web site, per se?

jdMorgan

4:41 pm on Feb 19, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, the terminology's still a bit shaky. However, <anything-at-all>.domain.com is indeed a subdomain of the domain name domain.com. Both <anything>.domain.com and domain.com are hostnames.

However, when you ask about the term for "www.abc.com/rock as [you're] intending to use it", I can't answer. I don't in fact actually know what your intent is.

It is a URL, but it could be
  • www.abc.com/rock -- An extensionless URL for a page named "rock" - or -
  • www.abc.com/rock/ -- A URL to the index page of a subdirectory named "rock/"

    And in addition, once we consider that "how I'm intending to use it" qualifier, then it could be that if "rock" has some functional relationship to this "new fourth site," then perhaps what you really mean is
  • Filepath /rock/ -- a server subdirectory used to store all files and folders for the new domain or subdomain "rock."

    I can't be sure, but it is often most helpful to make a firm distinction in mind and in writing between URLs used "out there on the Web" and filepaths used "here inside this server." It is in fact the primary job of a server to translate URL requests to server filepath requests; URL-space and file-space are two entirely different things, and a URL need have no visible relationship whatsoever to the filepath used to serve or generate content in response to requests for that URL.

    Jim
  • Montezuma45

    5:05 pm on Feb 19, 2011 (gmt 0)

    10+ Year Member



    My intent is to not to have all my sites open to the public. E.G., for the family members to access the photo gallery site section, instead of /rock, I would have /pictures and then there would not be a link on the page.

    If it is a publicly accessed section, it would have a link within the web site. But as a privately accessed site, you have to manually type in the extension. Therefore, I'm sticking it into Apache for that purpose. Does this make more sense?