Plusnet
Monday 22nd March 2010Login | Register | Help
Pages: [1]

Query on putting web site in htdocs subfolder?

« on 27/07/2007, 15:21 »
Hello,
I have a .co.uk domain pointed at my PN htdocs folder for my small business (and it uses a couple of cgi scripts). It does not use much of the htdocs space and I would like to take advantage of the chance to set up a small private password-protected web site to share photos with my family overseas. I don't need a fancy name for this site and would be  happy to use a path based on my PN free domain.

I understand that to use my cgi scripts I need to keep my business site in the root htdocs folder. Can I put my private site with its own index page in a subfolder of htdocs while leaving the business site in the root htdocs folder? If so, can it be done without having to acquire another domain name, and just use the path based on my PN domain instead?

I don't want to try it out without getting some advice first because of the danger of messing up access to my business site. Even if the approach is technically OK, is it sensible?  :?

Thanks in advance!
Logged
  • PJ
  • Posts: 315
  • View Profile
« Reply #1 on 27/07/2007, 16:10 »
AFAIK There's no reason why you can't point your domain name to a sub-folder of htdocs and still use CGI scripts (these are stored and run on a completely seperate server).

If I were you then I'd move the business website to a sub-folder of htdocs and create your family photos website in a seperate sub-folder of htdocs.

Customers will not be aware that the business pages are in a sub-folder of your webspace as the folder will be the "root" folder for the domain. I.e The file http://www.username.plus.com/business/index.html will be accessible to your users via the address http://www.businessdomainname.co.uk/index.html (or just the domain name), not http://www.businessdomain...co.uk/business/index.html
 
If your family photos are in completely seperate folder to your business website then they cannot be stumbled across accidentally or navigated to via your domain name. Do you really want your customers to see that hilarious picture of your chained naked to a lampost at your stag party? :lol:

Please don't hesitate to reply if you have any further questions.
Logged
  • PJ
  • Posts: 315
  • View Profile
« Reply #2 on 27/07/2007, 16:12 »
Please also be aware that any change will take a few hours to take effect, so you'll probably want to do it in the evening, giving a few hours for this propogate over night. Alternatively have a re-direct page in your htdocs, pointing to the new sub-folder.
Logged
« Reply #3 on 27/07/2007, 16:30 »
How did you know about that lampost picture?  :wink:

I thought I had read some time ago that to use cgi scripts you had to have your web site in the root htdocs folder. Maybe something has changed since.

So, I divide htdocs into two subfolders. Put the business pages in one folder and point my co.uk site at it (does anything have to be changed with the cgi scripts?). Put photos in the others and presumably that will be found using the address
http://www.username.plus.com/photos/index.html

And then use .htaccess on the photos folder to prevent the public seeing the lampost picture! (Can .htaccess be used on a folder to prevent public access to all files in the folder, or does it have to be used on individual files? You will guess I've never use it before!)

Thanks for tolerating all the questions.
Logged
  • PJ
  • Posts: 315
  • View Profile
« Reply #4 on 27/07/2007, 17:06 »
Quote
I thought I had read some time ago that to use cgi scripts you had to have your web site in the root htdocs folder. Maybe something has changed since.


Another victim of the hideously complicated PlusNet webspace setup (it's all there for a reason, but it is difficult to work out at first).

Essentially PlusNet do not allow any server side scripting at all on standard webspace (sometimes called the "www") server. If you upload a PHP script to the standard server and then navigate to it with your browser it won't run, instead there will be an "open with" dialogue when your operating system asks you what to do with it. This is for security reasons, mostly because of the rash of security holes that were found in PHP, and the ability for hackers to use these to trash people's websites.

If you want to use server side scripting (this doesn't include javascript or flash, these run in the visitor's browser) then you need to use the dedicated CCGI server. This needs to be activated in website settings (not available on some legacy account types) and files are then uploaded to ccgi.plus.net using your username and your password at the time you created the CCGI space.

Domain names can be pointed to the CCGI space if you want to use a lot of scripting but, due to limitations of the PlusNet implimentation, only one domain name can be pointed to each customer's space, and only to to the root folder. This is probably what you have read previously. There is a work around for this involving .htaccess files.

It is also possible to create a sub-domain (e.g. ccgi.businessdomainname.co.uk) that points to your CCGI space. Raise a ticket to request this.

Quote
So, I divide htdocs into two subfolders. Put the business pages in one folder and point my co.uk site at it (does anything have to be changed with the cgi scripts?). Put photos in the others and presumably that will be found using the address
http://www.username.plus.com/photos/index.html


That's correct. The CGI script should be on a completely seperate server (see above) thus nothing should need changing.

Quote
Can .htaccess be used on a folder to prevent public access to all files in the folder, or does it have to be used on individual files?


.htaccess controls access to all files the directory and any sub-directories. There's a tutorial here that may help you.
Logged
« Reply #5 on 27/07/2007, 17:19 »
Thanks for all the help - I hope to try this out on the weekend.
 Cheesy
Logged
  • mwright
  • Guest
« Reply #6 on 28/07/2007, 00:28 »
It may be a lot simpler to sign up for Google Mail and use the account just for sharing pictures it gives you 2 gig of disk space.

Simply then give your friends the password etc and the jobs a good one no complicated scripts etc to mess with just logon and go.
Logged
« Reply #7 on 28/07/2007, 10:51 »
Quote
It may be a lot simpler to sign up for Google Mail and use the account just for sharing pictures it gives you 2 gig of disk space.


Thanks for the suggestion. I've used this type of approach for other purposes but in this case I'm dealing with some elderly relatives who object to the advertising or get confused by it. Also, I want to make more of my PN web space available because I use so little for my business site.

Cheers!  Smiley
Logged
« Reply #8 on 28/07/2007, 12:46 »
Quote
...only one domain name can be pointed to each customer's space, and only to to the root folder. This is probably what you have read previously. There is a work around for this involving .htaccess files.


In the thread referred to, it says: "In the domain tool, I clicked under "Existing Domains" on "Configure" beside my new domain. Under the heading "Domain hosting settings" I set it to "Other", then clicked "Configure DNS Records". There I set "Left Field" to "www", "Type" to "CNAME", left "Pri" empty, and "Right Field" to "ccgi.plus.net." with a trailing dot".

But in this tutorial:
http://usertools.plus.net/tutorials/id/14
it says that doing this (keep your whole website on the CGI server) is "not recommended".

What is the official line on this from PN? Is there a danger to users in doing this, or a problem for PN if users do it?  :?
Logged
  • Peter Vaughan
  • Usergroup Member
  • *
  • Posts: 13702
  • Unofficial ledgendary bright spark bod!
  • View Profile
« Reply #9 on 28/07/2007, 13:02 »
The tutorial was written before the current ccgi hardware was installed and the recommendation no longer applies.

The old CGI solution was very slow (hence why it was replaced) and subject to many security breaches - the current setup is much more secure and very much faster than the previous one so runing your whole website on ccgi is fine.
plusnet ADSL Customer (PlusNet Pro)
PlusNet Usergroup | PUG Forums | Usertools | PUG Issue Tracker - Please vote!!
Volunteer at the National Museum of Computing @ Bletchley Park - Looking for donations of old games consoles, PCs and software. Contact me for details
Logged
Pages: [1]
Jump to:  

Related Sites

Community Apps

Here at Plusnet we're always trying to use clever open source things to make our lives easier. Sometimes we write our own and make other people's lives easier too!

View the Plusnet Open Source applications page

About Plusnet

We sell broadband, phone, VoIP and more to homes and businesses in the UK. Winner of 9 out of 11 Categories in the 2008 USwitch survey. Winner of "Best Consumer ISP" at 2008 ISPA awards. Voted number 1 in the Broadband Choices 2008 survey.

© Plusnet plc All Rights Reserved. E&OE

Powered by SMF | SMF © 2006-2008, Simple Machines LLC

Add to Technorati Favourites