Web server

Asked by Alejandro Padrino

Hello to all members,

yesterday I was try to install Ubuntu 12.04 Server. I want to make my own server to publish my web page in it. What are the steps I must do?

Thank you.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apache2 Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

sudo apt-get install apache2

Will give you a basic web server, if you need PHP and SQL functionality then I suggest you run:

sudo apt-get install tasksel; sudo tasksel install lamp-server

Revision history for this message
Alejandro Padrino (eb4bgr) said :
#2

Yes, I was do. But ... Where to put web files/folders in my computer server and how to enable my web into DNS services to show it from any internet connection?

Thank you.

Revision history for this message
Alejandro Padrino (eb4bgr) said :
#3

Editting and restarting apache2 service, I get next message:

apache2: Could not reliability determine the server's fully qualified domain name, using 127.0.1.1 for ServerName.

After restarting apache2 service I can ping to www.myweb.org from my ISP (not local LAN and web name does not have prefix "www"), but both computers are connected to same router. I can't show default web page. One friend can't ping to www.myweb.org from other different ISP.

Anyone can help?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

It may not have a WWW prefix, mine doesn't and works fine.

If you browse to:

http://localhost

Does it show the page? You can add content by editting /var/www/index.html

Revision history for this message
Alejandro Padrino (eb4bgr) said :
#5

From Ubuntu server I can't show and ping http://localhost. Also in Ubuntu server I can't access to X mode (startx), to show graphical mode. I was installed x.org

From other computer (windows), I can't show http://localhost and www.myweb.org, but I can ping to www.myweb.org. My ISP returns ping.

All tests was made trying both, "sudo ufw enable" and "sudo ufw disable". I want to show the web page stored in Ubuntu server computer (/var/www/index.html) accesing it from internet.

Thank you.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

If you run:

sudo apt-get install links2; links2 http://localhost

You can browse the site in CLI and itshould say:

It Works!

Revision history for this message
Alejandro Padrino (eb4bgr) said :
#7

Can't found links2 package (is Ubuntu Server 12.04). But, I think this command can browse the local file in server, and not solve to browse the the server file into web using internet.

Thank you.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#8

You will need to port forward from the router to the system, you will need your routers manual (or flick around the config to hunt the option out).

Revision history for this message
Alejandro Padrino (eb4bgr) said :
#9

To 127.0.1.1 ??? I always use Dynamic IP.

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#10

No, the system has an IP from the router, probably in the 192.168.0.0/24 range, forward to this IP from the router. You may want to put the system's interface to static IP so that address changes do not break the link.

If your web IP changes frequently, you can use noip or dydns to resolve your IP to a name so that you don't have to remember the IP, also software is available to continually update the IP/name pairing (noip2 is available for the noip service).

I use noip here, it's spiffy

Revision history for this message
Alejandro Padrino (eb4bgr) said :
#11

I was download Inadyn-mt free dns client from freedns.afraid.org

Thank you.

Revision history for this message
Alejandro Padrino (eb4bgr) said :
#12

Thanks actionparsnip, that solved my question.