Solved

Consideration for building websites

Posted on 2004-03-29
14
301 Views
Last Modified: 2010-04-20
Hi, this is my first time building a website, so I'm very new. I know some html but really unfamiliar to all the complex requirements to host my own website. Actually this is my company's website. My webserver is running under Red Hat Linux (should be an Apache server).
Here's my questions:
1). Currently the hard disk available in the server is 18GB, considering the files that we want to put in, we surely need a larger one. Is it possible to use a network attached storage, so that I can link the webpages in my server to the files in the NAS? What are the considerations and information do I need to find out? (we also want the NAS to be used as a shared drive for internal use)

2). How do I implement "Search" function in my website? (i.e to let users search throughout my website), do I need any software for that?

3). How do I implement a restricted access to my website? so that only certain users with password can access to my website (or certain webpages)? I think I need to have a database for this right? how do I implement the database (what software do I need, etc)?

4). If I want to implement an FTP, so that user can just go to my ftp site to download the files they need, what are the things that I need to do and consider?

5). How do I implement the security; because our plan is to have an NAS as extra storage to keep the files for download thru the website or FTP, but as the same time (if possible) we want to use this storage as a network drive for internal use.

I hope I had made myself clear. Really appreciate any help I can get! please take note that I am a novice web development, I had no experience at all, so please elaborate as much as you can.. THANKS again!!

0
Comment
Question by:bluefile
  • 5
  • 4
  • 3
  • +1
14 Comments
 
LVL 17

Assisted Solution

by:Tacobell777
Tacobell777 earned 50 total points
ID: 10709815
1). Currently the hard disk available in the server is 18GB, considering the files that we want to put in, we surely need a larger one. Is it possible to use a network attached storage, so that I can link the webpages in my server to the files in the NAS? What are the considerations and information do I need to find out? (we also want the NAS to be used as a shared drive for internal use)

18 Gb is not enough for a website? 18 gig should be more than sufficient for any website, unless you are wanting to put MP3 or other large files on it.

I strongly suggest against using a network drive to serve web content from, there is to much that can go wrong, it not reliable and fast enough.

2). How do I implement "Search" function in my website? (i.e to let users search throughout my website), do I need any software for that?

Yes you would need software for it, but since your running Linux I can't give you much info here. I know on windows you can use the index server, or Verity of your running coldfusion.

3). How do I implement a restricted access to my website? so that only certain users with password can access to my website (or certain webpages)? I think I need to have a database for this right? how do I implement the database (what software do I need, etc)?

The easiest way would be to programatically secure the website, so you can automatically add new users etc. You need to decide what server-side language and db server you want to use.

4). If I want to implement an FTP, so that user can just go to my ftp site to download the files they need, what are the things that I need to do and consider?

Get an FTP server, most likely Linux has one that you can install. Not much you can do wrong with an FTP server really.

5) don;t do it...
0
 

Author Comment

by:bluefile
ID: 10709897
Hi Tacobell, thanks for the fast reply

1) We need to put up a lot of data sheets and manuals for users to download, currently the files are in our internal network drive. that's why we're thinking of having an additional NAS that can server as internal network drive and for storing the files for the website, why do you say "don't do it"  (refer to qtn 5's answer)?

3) how do i choose the language? what are the options do i have? how do i programmatically secure the website? kindly explain in details.. i'm very new at this.. :)

Thanks tacobell!
Still hoping for some enlightments.. anyone, please help !!


0
 
LVL 17

Expert Comment

by:Tacobell777
ID: 10710030
3) well I guess you choose the language by looking at your budget and your current platform. You'll need to look at what runs well on Linux, which is most likely perl or PHP but don't take my word for it. Personally I prefer ColdFusion above anything, but thats just me.

To explain how to programatically secure the site would take a long time and depend on what language you choose to go with.
But in short;

Check if a session variable exists, if not, redirect the user to a login screen etc. etc. etc.

1) Unfortunately I am not familiar with NAS, but I believe you are talking about using a network drive, if so, then it's just not reliable to host a website from.

0
 

Author Comment

by:bluefile
ID: 10710867
1) NAS is an IP based storage system, you can just plug it to the network and it has its own IP address.. this is the only thing i know about NAS.

You are saying that the website is best to be host directly from the server?

2) what is coldfusion? do you have any website that i can refer to about coldfusion?
thanks!
0
 
LVL 17

Expert Comment

by:Tacobell777
ID: 10711057
1) yes its best to use a disk thats physically located in the server. Unless of course you are not worried about speed and reliability?

2) coldfusion is sold by www.macromedia.com (it's not free) but its a very flexible language and easy to pick up. For free server side languages you need to look at things like PHP which has a higher learning curve but is free... And www.mysql.com for database is also a good free solution.
0
 
LVL 8

Accepted Solution

by:
HaydnH earned 210 total points
ID: 10712159
If you are running Linux & Apache I would strongly recommend PHP and either MySQL or PostgreSQL. The benefits of MySQL traditionally were that is was faster than PostgreSQL - however it had very limited functionality - origionaly it didn't even support sub-queries (Ick!). Overtime as MySQL added the functionality that PostgreSQL already had the performance of the 2 has started to become more comparable. My personal preference is PostgreSQL - but theres not much in it to be honest.


1) As Tacobell says, the storage should ideally be on a local disk. However, if you really more storage (which I really daubt!) don't want to buy a larger disk (although they're really cheap now) you could just mount the network drive to a subdirectory of the Apache document root. The way apache works is that it runs under an unprivaledged user which only has permission to read the document root folder for security reasons (obviously you don't want them to have access to the /etc directory etc!). It's usualy called "/pathToApache/htdocs" - so mounting a netword drive to "/pathToApache/htdocs/NetworkDrive" will allow users to read that mount point also.


2) If the website is an external website you could just use google to search just your site. If it's internal you would need another solution - the solution would depend on the design of your site. For example, if you wanted to search the database for the documents it contains you could simply do an SQL based search on the database for items containing the keywords foo & baa.


3) Restricted access for an Apache server is very easy. Your directory structure should be split in to restricted and non-restricted directories. In a restricted directory you simply place a .htaccess file stating the restrictions that imply - eg deny all users unless they're connecting from the hostname "FredsMachine", Ip addy: "192.168.0.1" or are logged in with the username: "Fred". For the last restriction the user will automatically be prompted for a username & password by Apache. For more info on the .htaccess files see:

    http://httpd.apache.org/docs-2.0/howto/htaccess.html


4) Would you really want just an ftp site? How would the users know what the name of files they need are? Surely providing them with a menu & search function on your website would be easier for the end users? If you really require an ftp server there is 1 provided with Redhat.


5) See (3)... if the correct .htaccess file is in place on the network drive then only those that you have granted rights to would have access to it.


Hope that helps a little... please feel free to post more questions here if you require more info.

Haydn.
0
 

Author Comment

by:bluefile
ID: 10720782
Hi Haydn,
1). okay, so it's best that the files are in local disk. but u said it is possible to do it by mounting the drive. maybe i'll explain what i need to do first, and let me know whether it is feasible.

what i have in mind now is:
i buy NAS as additional storage, i put it in my network (it has its own ip address), so that all internal files and documentation can be stored there. our employees can all access the files by just mapping a drive to the NAS (serve as network drive).
i also want to link my webpages to SOME of those files. and there should be some restricted webpages containing link to restricted files (internet user will need to provide username & password to access these webpages).

so, is it possible to do the mounting now? or do you have any better solution in mind? i don't want to burden my LAN network and i don't want to sacrifice speed and reliability.

how do i implement the database to list all the user and password? is it using mysql and php? or just need to use the .htaccess file? where myqsl and php takes position in the implementation?

2). site search funtion,when an internet user enters my website, i want them to be able to search within my site. this is an external website but once they enter, i want them to be able to search inside my site. how do i incorporate google for this purpose? is it free? any other free and good search engine?

4). the ftp server is actually just an option for the internet user to download the big-sized files directly. my linux is Redhat, where can i find the ftp server? how do i install it? if i use the NAS mentioned above, can i use the ftp from my linux machine (so that user can go to our ftp site and download the file that are stored in the NAS, it would be transparent to them however)?

any recommended website to read up regarding linux, apache? i'm totally new and so forgive me if i sounded blurred.. (i am indeed..)
Thanks so much in advance.. looking forward for your help..

bluefile
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 2

Expert Comment

by:noamkrief
ID: 10729195
for search feature i agree with HydnH. MYSQL.
You must learn MYSQL and PHP.

If you are storying such large files that you need 18gb of data, i wouldn't recommend running this server from home unless you have alot of upload bandwidth.

Password protecting a pag
0
 
LVL 2

Expert Comment

by:noamkrief
ID: 10729207
sorry,  accidendly presses submit.

As i were: password protecting a page can be done with htaccess but it looks much nicer if you just create a userdatabase with mysql.

If you have no experience with mysql i would recommend learning MS access for 2 weeks. Learn queries and take a look at their SQL view.

PHP and mysql are not hard to learn. You can become very good at both in less than a month. You will be able to implement a SQL database of your site for searching and access rights...

Also i would recommend agaist the network drive idea...
Good luck
Noam
0
 
LVL 8

Expert Comment

by:HaydnH
ID: 10730448
"so, is it possible to do the mounting now? or do you have any better solution in mind? i don't want to burden my LAN network and i don't want to sacrifice speed and reliability."

If you have the Linux box on the same network as the storage, and the storage is a supported file system (there's loads, dos, ntfs, ufs, fat etc etc) then you would be able to mount it to the web server. Have a look at the man page for "mount":

    http://linux.about.com/library/cmd/blcmdl8_mount.htm

(don't be afraid of all the options, it's actually very simple and you probably won't need any of them).

With regards to speed - yes of course there will be an impact on your network as everytime somebody requests a file from the web site it will have to travel through your network to the web server. How big this impact is will obviously depend on the amount of data that's being requested - your network may be fast enough it may not be. This is why it is preferable to have the data stored on the local drive.



Google:
---------
You can search your own site using google by passing it the "site:" option, for example:

    Google search string:        starfire E25K site:www.sun.com
    Google URL:                     http://www.google.com/search?q=starfire+E25K+site%3Awww.sun.com



FTP:
------
Redhat comes with VSFTP (very secure FTP), have a look at this link re activating it:

    http://www.experts-exchange.com/Operating_Systems/Linux/Q_20636556.html

Allowing the users access to the network drive would be the same method as for the web server, we could just mount the path. I would suggest having a quick read about the unix/linux filesystem structure, it should help you understand what the mount command does a little easier - I've found a good read on the subject here:

    http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/Linux-Filesystem-Hierarchy.html


Hope this helps.

Haydn.
0
 
LVL 8

Expert Comment

by:HaydnH
ID: 10730469
p.s: I was referring to just the Forward of that last url - theres far more info there than you would actually need - although you may find the rest of it useful/interesting.

Haydn
0
 

Author Comment

by:bluefile
ID: 10737302
hi
okay, guys thanks for all the info, i think i'll go and read up as you all suggested. anyway one last question before i distribute the points,
regarding the site search using google, how to use the string that you gave (in the html file i mean)?
usually in html, i can implement the text field using FORM right? then should i pass the user input to the google URL u mentioned?
how's the syntax looks like?
thanks!
0
 
LVL 8

Expert Comment

by:HaydnH
ID: 10755465
Yes you would use a form, lets say somebody entered "starfire E25k", you would put a "+" between the 2 words, then add "+site%3Awww.YourSite.com" to the end so that it looks like:

    http://www.google.com/search?q=starfire+E25K+site%3Awww.sun.com

Haydn.
0
 

Author Comment

by:bluefile
ID: 10762248
Guys, thanks for the help.. especially Haydn, I'll try to work based on what you have suggested.
Thanks!!!
0

Featured Post

Superior storage. Superior surveillance.

WD Purple drives are built for 24/7, always-on, high-definition security systems. With support for up to 8 hard drives and 32 cameras, WD Purple drives are optimized for surveillance.

Join & Write a Comment

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now