LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 04-04-2010, 12:18 AM   #1
Computer_Apurv
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Rep: Reputation: 0
Smile How to create a website on fedora 12.


Hello friends,

I wanted to start a website on fedora 12.But dont know how to proceed.Website is to be build for college.I know how to setup localhost on fedora 12.But there are certain points like "webspace"
and "domain name".Can I have my own DNS server?...then how to set it up..? Basically can anybody help me out on how build a website on fedora 12...? What to purschase...?What can be done without purchase..?Thanks in advance...
 
Old 04-04-2010, 12:30 AM   #2
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian jessie/sid; OpenSuSE; Fedora
Posts: 1,589

Rep: Reputation: 161Reputation: 161
Apache is the web server program. You need to determine your your IP (The first thing the modem attaches to will have your ip. If it is a router, you look in the router config. If it is a PC, you run /sbin/ifconfig. Apache has a directory in which to put the public files. Then, you go to a dynamic DNS site, get domain, and set it to your IP. Forward TCP ports 80:81 incoming, or open them using the firewall program. That's about it. And yes, you can run your own DNS server, or you can choose a DNS server that already exists.
 
1 members found this post helpful.
Old 04-04-2010, 02:10 AM   #3
kainosnous
Member
 
Registered: Mar 2010
Location: Tennessee, USA
Distribution: Arch, Fedora
Posts: 59

Rep: Reputation: 18
Basically, what you are talking about is a LAMP web server (Linux Apache MySQL PHP). You can google for some good tutorials. All of those packages are freely available and can be installed with System -> Add/Remove programs in Fedora. To start Apache (the daemon is called httpd) you can type the following in a terminal:

Code:
services httpd start
Then, just open up a web browser and go to http://localhost/ The other packages are PHP for server-side scripting and MySQL for a database. These aren't necessary, but these days are pretty standard and not much trouble to set up.

Mostly, you will be editing the file /etc/httpd/conf/httpd.conf which isn't nearly as hard as it looks. The entry DocumentRoot tells Apache where the root directory is. You can drop your html files there or point it to another directory. Remember to restart Apache after editing that file.

As for DNS, if you are going to be a part of your college network, you could just as your network administrator to set the entries for you in the network's DNS server.

If you are running your own network, you may need to install BIND (it's daemon is named) and optionally dhcpd. Both of those are also in Add/Remove programs. However, if you only want a really simple network, you could just forget about those programs and just edit each computer's /etc/hosts file.

It's not very hard, and is totally free. Later, you can learn about Linux networking, routing and firewalls with iptables, etc.
 
1 members found this post helpful.
Old 04-05-2010, 01:38 AM   #4
Computer_Apurv
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Hey,

First of all thanks to both of you.
Hi! Kinosounous.
I have done http://locslhost/ .I dont have static ip at home. I have also put some HTML pages into /var/www/html.The page gets displayed in mhy browser once I type http://localhost/ in the browser.Is there any way I can make this localhost accessible to others.
Actually project is to start a website for computer science branch that has features such as repository that maintains projects of students,forum,blogging ,etc.Can anyone eleborate more on DNS setup?I new to this Linux world ,is it that localhost can be made accessible to others if i have a live ip..?
 
Old 04-05-2010, 08:24 AM   #5
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian PPC/i386/AMD64 6/7, Vista, XP , WIN7, Server 03/08
Posts: 1,278

Rep: Reputation: 91
You can run your own nameserver and in many cases if you are behind a NAT router you will, so you can access internal private resources by name instead of IP address. However, I believe you have to register a nameserver that is on the Internet. That said, there are alternatives. Use a service like dyndns.org, no-ip.info or other DNS service that allows you to take a registered domain name, that you have registered and let it redirect to an IP address. DynDNS is a dynamic DNS service which will let you run a client on your computer and update their nameservers as your IP address changes. As far as making your content accessible to the outside world. First if you are behind a NAT firewall/router the router need to have port forwarding or IP mapping and you need to have access to the configuration. If you are behinf a NAT firewall you should set your computer IP to static in order to map the port forwarding or IP mapping to your machine. If you cannot edit the NAT firewall configuration only those behind the firewall would be able to access the site hosted on your computer. Second in either case you need to make sure that your iptables rules on your machine are not blocking the ports you want open, in this case probably 80 HTTP and 443 HTTPS If your PC blocks those ports no one can access the content. Hope this helps.
 
Old 04-07-2010, 05:38 AM   #6
kainosnous
Member
 
Registered: Mar 2010
Location: Tennessee, USA
Distribution: Arch, Fedora
Posts: 59

Rep: Reputation: 18
The first step is to set your IP address. "localhost" is set in your /etc/hosts file and is a special IP address (127.0.0.1 called the loop back address) that just points your computer back to itself, so that won't work. In theory, you could just choose almost any IP address for yourself, but in practice, the address will have to be one inside of the same network as the other computers. If you are already on the network, that address is probably set for you. Assuming that you are connected over an internet cable, you could type "ifconfig eth0" The output should contain a line that says "inet addr 192.168.1.102" or something like that. That number is your IP address. ifconfig is also the command that can set your IP address too if you know what it should be: ifconfig eth0 192.168.1.102

Once you have your IP address, another computer on that network could point their browser at that address (i.e. http://192.168.1.102/) However, there could be some complications. The first is that your computer's firewall (iptables) could be set to block incoming requests for http. Also your IP address may be dynamic. If that is the case, it will be changed each time you reconnect to the network.

A DNS is a Domain Name Server that takes a name like www.linuxquestions.org and converts it into an IP address like 75.126.162.205 You should worry about that after everything works fine with the IP address. As the previous post mentioned, you will need to use NAT if you need to be reached from outside of your college. Most likely, though, all of the client computers (those that are browsing your site) will be on the same subnet.

This is where I would recommend looking up a good tutorial on networking in general. There are a lot of things that can go wrong. They are often simple to fix if you know what you're doing, though.
 
  


Reply

Tags
building, fedora, website


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create new account for website editing only andrewz Linux - Newbie 5 10-06-2009 09:04 PM
Looking for suggestions to create a website mohtasham1983 General 4 07-06-2007 06:28 PM
What if i want to create website on cd ? my-unix-dream Linux - Security 2 06-08-2005 09:37 PM
Create New Folder in KDE for Website AndeAnderson Linux - Newbie 3 04-11-2005 04:17 PM
I need to create a website.. concoran General 2 10-21-2002 12:06 AM


All times are GMT -5. The time now is 01:24 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration