Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #61  
Old 4th January 2009, 05:26 PM
SendDerek's Avatar
SendDerek Offline
Registered User
 
Join Date: Nov 2007
Posts: 198
Honestly vginov, I wouldn't even know where to start with a project like that. But, I did find this after a quick google search:

http://directory.fedoraproject.org/

Maybe that would be something interesting? Looks like there's an installation guide on the red hat website as well:

http://www.redhat.com/docs/manuals/d...8.0/index.html

Good luck!
Reply With Quote
  #62  
Old 6th January 2009, 06:08 AM
vginov Offline
Registered User
 
Join Date: Aug 2008
Posts: 16
Dear SendDerek

I got a the Link from AbsoluteMonkey(User). It helped me a lot. and I am experimenting on it. Once i learn about it fully I will sure give a step by step guide to do it in my site.

Thanks a lot for your kind response.

I went to your web page. I saw some nice tips even i did not hear before like virtualbox. I use vmware. Now i am changing to virtualbox. The credit goes to you . Thanks for it...

AGAIN A SMALL QUESTION:


As you are a web developer you may be able to assist me regarding this. I have another one doubt and also later on it is my need.

Here I explain it:

1. I have an intranet setup.

2. My web root is /var/www/html

3. My hard disk storage size is 100GB

4. Now i have only 4 GB Free space left.

5. I bought a drono drive.

6. It is USB and i mount it under /media/storage

My question is:

How can i set it as the storage for my web root so that i have more space for the web?

If you know kindly assist me.

Thanks a lot.
Reply With Quote
  #63  
Old 6th January 2009, 07:34 AM
Zigzagcom Offline
Registered User
 
Join Date: Feb 2005
Location: CALIFORNIA, yeah
Age: 86
Posts: 1,657
Smile

Just a note on security for your web-server. In /etc/httpd/conf/httpd.conf under "Section 2: 'Main' server configuration", there is a section for the "Options Directive". The default is to allow Indexing of directories. It would look like this:

Code:
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
    Options Indexes FollowSymLinks
I stronly suggest to disable Indexing, unless you specifically need it.

Code:
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
    Options -Indexes FollowSymLinks
The reason is as follows:
Suppose you install an application such as Mambo or Joomla. The directory structures of many open and paid for applications are well known. Assume that some sub-directory does not have an index.html file, but possibly some file that contains information you want to keep private.
When you access a page with a URL (domain name like www.example.com), it is the index.html file that gets displayed by default. Now go to the site ( I'm really talking about your own site here), but append a path to a known or guessed directory, like www.example.com/subdirectory/subdirectory.

With indexing enabled, and a missing index.html file, the contents of the directory will be indexed in the web-browser.
It is also possible to view the source of the default index.html file, and see <a href> and <img src> links, that point to sub-directories in your /www/html/ root.

A index.html should be in every directory, but many folks create a site and never think of this vulnerability.

Just disable indexing.
__________________
Ziggy

Last edited by Zigzagcom; 6th January 2009 at 07:43 AM.
Reply With Quote
  #64  
Old 6th January 2009, 07:48 AM
vginov Offline
Registered User
 
Join Date: Aug 2008
Posts: 16
Dear Zigzagcom

Thanks for the tips
Reply With Quote
  #65  
Old 6th January 2009, 09:32 AM
pwca Offline
Banned
 
Join Date: Nov 2008
Posts: 827
@ SendDerek

First, thank you for putting together a tutorial that isn't loaded down with geek speak. All to often "tutorials" end up being nothing more than a man page redux.

Now for the bad news.

Second, the web-server you suggest is not "free". A person has to have a broadband account as well as spare computing machinery laying around to use as a server. BTW, it's not necessary to have a broadband account. A secondary POTS line works too, unless that is, a person intends to be the next streaming media Disney channel.

Third, using a "standard" broadband account for hosting websites is a big no-no for many (note I did not write ALL here) ISP's. If you look into the user agreement you will find that using the account for a webserver or hosting service is strictly forbidden. The ISP's that do not allow this sort of activity on a "standard" broadband account do sell accounts that will allow you to have a webserver or perform webhosting, However, these accounts cost big €/$.
Reply With Quote
  #66  
Old 6th January 2009, 04:11 PM
Hlingler's Avatar
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,289
Points of Order here:
> I am fairly certain that SendDerek was referring to the cost of hosting the web server/service itself when he wrote "free", not the base cost of the internet access, and subsumes hardware on hand. Also, I fail to see why existing hardware would not be sufficient, assuming of course that it has the capacity(ies) required for a web server - in other words, a second/extra PC/hardware is not necessarily required.
> While I believe that pwca is correct in stating that many (even most?) ISPs do prohibit the hosting of web servers/sites on "standard" residential service accounts, there is nothing illegal nor nefarious per se in doing so, to the best of my knowledge. It is, of course, incumbent upon each individual to ensure that (s)he is in compliance with the terms of the applicable service agreement. Duly noted, and readers may consider themselves warned to check their service agreement before hosting "the next streaming media Disney channel", or whatever.

V
Reply With Quote
  #67  
Old 7th January 2009, 03:43 AM
karossii Offline
Registered User
 
Join Date: Jan 2009
Posts: 1
High(er) home speeds

Hi...

I have set up a few web servers, and I love this tute. It made things a bit easier on this last go round.

I am getting frustrated with my ISP (Comcast in the Denver CO region) due to a very regular dropping of my connection - I have their highest speed package (theoretically just recently doubled from 8M down /2M up to 16M down /4M up; but I have not noticed any faster speeds since that doubling) and I should be able to reliably host a few small sites (and/or use bitTorrent clients to distribute software I develop, download music and movies, etc.). But any time I have a heavy load for more than ~15 minutes, my modem is dropped; it doesn't matter the cause of the load (serving a site, running a game server, doing a direct transfer to another computer, P2P software, or just an FTP or HTTP up/download). They say it is my modem; but they said that it was THEIR modem before I went and bought my own new device. They are limiting my bandwidth and I am sick of it.

What would be the best option for me, to get some super high speeds up and down? I would like to build a datacenter in my basement, but that is not going to happen on my budget; and google isn't helping much... when I search for providers in my area I either get comcast, or I get datacenters leasing serer space. I just want a good reliable 6+M down and 3+M up connection, where I don't have to worry about anyone like Comcast or Qwest throttling my connection speeds when I get too many users online, or when I host a game or start file sharing.

I am hoping to stay at or under $100 a month, but could probably afford a little over double that if I had to.

Thanks!
Reply With Quote
  #68  
Old 7th January 2009, 10:12 PM
Zigzagcom Offline
Registered User
 
Join Date: Feb 2005
Location: CALIFORNIA, yeah
Age: 86
Posts: 1,657
Virtual Hosting...

OK, vginov asked me to help him with virtual hosting. I 'll try and post a little bit of an explanation of how it works.

Virtual Hosting is the concept of being able to host several/many domains on a server with the use of minimal ip addresses.,
if not with only one shared ip address. Let me start with some basic parameters for the purpose of this exercise.

1. Let's define a static IP address for the server (I'll let you guys deal with enabling port 80 and port 443 in the firewall and setting up the IP's):
Quote:
eth0: 192.168.1.99 ......This is a private IP address, but public IP's can be substituted. Keep NAT/PAT in mind, when using private address space.
eth0-1: 192.168.1.100 ......This is a sub-interface. I'll explain the second IP address as we go along.
2. We need a hostname for the server.
Quote:
srv1.site-a.com
3. Let's define some domains:
Quote:
www.site-a.com
www.site-b.com
www.site-c.com (secure) We'll see how SSL works as well
www.site-d.net (secure) The second IP address will be needed here.

Think of these domains as if you registered them exactly as they appear here. OK, usually without the www.
These domains would need to have DNS configured for them, i.e., a DNS server or service will need to associate these domains with an IP address record.
This is an exercise for you folks.
4. We need to set up a directory structure under /var/www/html, our document root (as defined in /etc/httpd/conf/httpd.conf).
Code:
cd /var/www/html
mkdir site-a
mkdir site-b
mkdir site-c
mkdir site-d

I assume you will place content into each directory, i.e., your index.html, pix, etc.
The site-c domain will be accessible via SSL.
Likewise, site-d will only be accessible via SSL.

Here are the complete pathes again:
/var/www/html/site-a
/var/www/html/site-b
/var/www/html/site-c
/var/www/html/site-d
__________________
Ziggy

Last edited by Zigzagcom; 7th January 2009 at 11:29 PM.
Reply With Quote
  #69  
Old 7th January 2009, 10:13 PM
Zigzagcom Offline
Registered User
 
Join Date: Feb 2005
Location: CALIFORNIA, yeah
Age: 86
Posts: 1,657
Please keep in mind, that I am adding information to SendDerek's tutorial. It is an excellent how-to, and some of the parameters here are for instructional purposes only.


OK, now for a look at the Apache configuration file /etc//httpd/conf/httpd.conf.
The sample is heavily snipped, with only the most important parameters and directives shown:
Quote:
### Section 1: Global Environment

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.

# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)

#Listen 12.34.56.78:80
Listen *:80

# Load config files from the config directory "/etc/httpd/conf.d".

Include conf.d/*.conf

### Section 2: 'Main' server configuration

#ServerName www.example.com:80
ServerName srv1.site-a.com:80

DocumentRoot "/var/www/html"

<Directory "/var/www/html">
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
Options -Indexes FollowSymLinks
</Directory>

# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.

DirectoryIndex index.php index.html index.html.var index.htm

### Section 3: Virtual Hosts

NameVirtualHost 192.168.1.99:80

<VirtualHost 192.168.1.99:80>
ServerName www.site-a.com
ServerAlias site-a.com
DocumentRoot /var/www/html/site-a
</VirtualHost>

<VirtualHost 192.168.1.99:80>
ServerName www.site-b.com
ServerAlias site-b.com
DocumentRoot /var/www/html/site-b
#<Directory "/var/www/html/site-b">
#Options Indexes FollowSymLinks
#</Directory>
</VirtualHost>

<VirtualHost 192.168.1.99:443>
ServerName www.site-c.com:443
ServerAlias site-c.com
DocumentRoot /var/www/html/site-c
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/site-c.com.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/site-c.com.key
</VirtualHost>

<VirtualHost 192.168.1.100:443>
ServerName www.site-d.net:443
ServerAlias site-d.net
DocumentRoot /var/www/html/site-d
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/site-d.net.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/site-d.net.key
</VirtualHost>
As you can see, httpd.conf is divided into three sections.
Let me explain the items in bold text.
1. The Listen *:80 global directive tells Apache to listen on all interfaces at port 80.

2. Include conf.d/*.conf tells Apache that there may be additional configuration files
in /etc/httpd/conf.d/*.conf. On some distributions, there may be a ssl.conf amongst others,
specifying the path to ssl certificates, often stored in /etc/pki/tls/, but here we'll place the
certificates and keys into the /etc/httpd/conf/ssl.crt and /etc/httpd/conf/ssl.key directories.
You would have to create these directories.
It is important to protect your certs and keys with the correct permissions, usually root: rwx------.

3. ServerName srv1.site-a.com:80 just is the name of the server. You can
call it www.site-a.com.

4. Options -Indexes FollowSymLinks disables indexing, but can be enabled specifically
for a given <VirtualHost> if you so choose.

5. DirectoryIndex index.php index.html index.html.var index.htm tells Apache
what type of index pages to serve. The reference to index.php can often be found in the
Include file at /etc/httpd/conf.d/php.conf (remember the Include directive).

6. NameVirtualHost 192.168.1.99:80 This directive is required if you want to configure name-based virtual hosts.
Here we set the main IP address and default port.
__________________
Ziggy

Last edited by Zigzagcom; 8th January 2009 at 02:03 AM.
Reply With Quote
  #70  
Old 8th January 2009, 12:30 AM
Zigzagcom Offline
Registered User
 
Join Date: Feb 2005
Location: CALIFORNIA, yeah
Age: 86
Posts: 1,657
We are getting there....

As far as DNS is concerned, static or dynamic DNS is very much the same.
You just need to make sure that your domain is pointing to the server IP.
I don't really want to get into all the gory DNS details, so forgive me if this is brief.
I'll use private IP's for simplicity.
Quote:
Domain name: site-a.com ---> 192.168.1.99 Address record
CName name: www ---> site-a.com

Domain name: site-b.com ---> 192.168.1.99 Address record
CName name: www ---> site-b.com

Domain name: site-c.com ---> 192.168.1.99 Address record
CName name: www ---> site-c.com

Domain name: site-d.net ---> 192.168.1.100 Address record
CName name: www ---> site-d.net
I call each instance of a virtual host a <VirtualHost> stanza. Lets look at the first one:
Quote:
<VirtualHost 192.168.1.99:80>
ServerName www.site-a.com
ServerAlias site-a.com
DocumentRoot /var/www/html/site-a
</VirtualHost>
I define the IP address and port, then the ServerName, www.site-a.com. Next I define a ServerAlias, site-a.com and then the document root with the name of the directory where
I can find the content for site-a. This is about as simple as it gets.
Likewise for site-b. It's time to open a web-browser.

I type the address www.site-a.com into the address bar of the browser.
The resolver looks for a matching IP in the hosts file, but it's most likely not there.
Time to query DNS, and as long as the domain is registered, DNS will return 192.168.1.99.
(Well, this is private address space, so it would normally be a public IP, NATted to 192.168.1.99)

The browser now has a destination IP address and sends the TCP packet, including the www.site-a.com domain name in the httpd header portion.
The web-server's eth0: 192.168.1.99 interface receives the packet at port 80 and Apache looks at the httpd header. It sees www.site-a.com, and can match the request with
the <VirtualHost> container for www.site-a.com. Since the Document Root is defined,
it knows from which directory to serve content.

So it would also happen for www.site-b.com, just that it refers to a different <VirtualHost>.
__________________
Ziggy

Last edited by Zigzagcom; 8th January 2009 at 01:31 AM.
Reply With Quote
  #71  
Old 8th January 2009, 01:34 AM
Zigzagcom Offline
Registered User
 
Join Date: Feb 2005
Location: CALIFORNIA, yeah
Age: 86
Posts: 1,657
Reserved for last piece....it kinda fun. I am a bit pooped, so this last section will be completed a tad bit later.

Anyway, setting up simple <VirtualHosts> is not to bad. (Here's more info: http://httpd.apache.org/docs/2.2/vhosts/)

SSL/TLS is quite interesting and can give folks a bit of a head ache. Although I have a fairly good understanding of it,
Ill do a bit of research, in order to give as simple an explanation as possible.
__________________
Ziggy

Last edited by Zigzagcom; 8th January 2009 at 02:13 AM.
Reply With Quote
  #72  
Old 8th January 2009, 05:09 PM
SendDerek's Avatar
SendDerek Offline
Registered User
 
Join Date: Nov 2007
Posts: 198
Quote:
Originally Posted by vginov View Post
Dear SendDerek

I got a the Link from AbsoluteMonkey(User). It helped me a lot. and I am experimenting on it. Once i learn about it fully I will sure give a step by step guide to do it in my site.

Thanks a lot for your kind response.

I went to your web page. I saw some nice tips even i did not hear before like virtualbox. I use vmware. Now i am changing to virtualbox. The credit goes to you . Thanks for it...

AGAIN A SMALL QUESTION:


As you are a web developer you may be able to assist me regarding this. I have another one doubt and also later on it is my need.

Here I explain it:

1. I have an intranet setup.

2. My web root is /var/www/html

3. My hard disk storage size is 100GB

4. Now i have only 4 GB Free space left.

5. I bought a drono drive.

6. It is USB and i mount it under /media/storage

My question is:

How can i set it as the storage for my web root so that i have more space for the web?

If you know kindly assist me.

Thanks a lot.
Sorry about the delayed response, but what about a symbolic link to the external HDD maybe?

Code:
ln -s \media\drono \www\var\html\drono

Last edited by SendDerek; 8th January 2009 at 05:12 PM.
Reply With Quote
  #73  
Old 8th January 2009, 05:17 PM
pwca Offline
Banned
 
Join Date: Nov 2008
Posts: 827
Quote:
Originally Posted by Hlingler View Post
Points of Order here:
> I am fairly certain that SendDerek was referring to the cost of hosting the web server/service itself when he wrote "free", not the base cost of the internet access, and subsumes hardware on hand. Also, I fail to see why existing hardware would not be sufficient, assuming of course that it has the capacity(ies) required for a web server - in other words, a second/extra PC/hardware is not necessarily required.
> While I believe that pwca is correct in stating that many (even most?) ISPs do prohibit the hosting of web servers/sites on "standard" residential service accounts, there is nothing illegal nor nefarious per se in doing so, to the best of my knowledge. It is, of course, incumbent upon each individual to ensure that (s)he is in compliance with the terms of the applicable service agreement. Duly noted, and readers may consider themselves warned to check their service agreement before hosting "the next streaming media Disney channel", or whatever.

V
Good Grief I didn't mean to imply the OP was advocating being "nefarious". Nor Illegal.

I was just pointing out that because most/many ISP's don't allow for this type of activity on a standard account that the person following the OP's guide shouldn't be surprised when their service is shut off and/or quite possibly the ISP bans them from opening a new account.
Reply With Quote
  #74  
Old 11th January 2009, 02:13 PM
vginov Offline
Registered User
 
Join Date: Aug 2008
Posts: 16
Dear Zigzagcom

Thanks a lot for your kind support. I did try virtual host. it works fine when i give

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.site-a.com
ServerAlias site-a.com
DocumentRoot /var/www/html/site-a
</VirtualHost>

If i do not use * it gives me some message when i restart the httpd service.

I will try my best to troubleshoot it. Once i finish it I will post the problem and the solution.

And once i finish everything I will give a video tutorial on it. So that people can understand the usefulness of Linux.

Thanks again
Reply With Quote
  #75  
Old 11th January 2009, 02:18 PM
vginov Offline
Registered User
 
Join Date: Aug 2008
Posts: 16
Dear SendDerek

Just now i google about "symbolic link". The command you issued is correct. Thanks a lot for the help.

I was wounding how does the youtube manage these much data now i got it and i will be able to use it for my own also. So kind of you.

thanks for your nice step by step tutor
Reply With Quote
Reply

Tags
free, selfhosted, server, setup, tutorial, web

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
(noob) Cannot play audio files hosted on Windows server, Linux OK nezwick Using Fedora 7 10th February 2008 06:35 PM
VNC Server Config Tutorial darkscript Servers & Networking 7 21st September 2007 11:55 AM
How to set up a simple web server - Tutorial chichikov Guides & Solutions (No Questions) 3 15th August 2006 01:48 PM
PostGreSQL 8.1.4 Initial Setup and Config Tutorial eengnerd Using Fedora 0 2nd August 2006 11:52 PM
add banners to free hosted sites vinhdt Using Fedora 2 29th November 2005 02:29 AM


Current GMT-time: 17:44 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat