Hello and interesting help ahead of time.

I'm attempting to help a buddy to setup a PHP Application on Ubuntu and Apache 9., there is a public IP to make use of but they're unaware regarding how to configure the applying to really make it visible on the web using such IP.

I've attempted to research on the internet and here however i couldnt find anything obvious/helpfull enough, and so i question if everyone could provide me of some info regarding how to accomplish this.

Their Apache version is 9. as well as their distro is Ubuntu Server 9.1

Regards, CR

The general public IP finish-point is probably attached to a router. You will have to create NAT port sending from to ensure that all the traffic visiting port 80 (or 443 if using SSL/TLS) could be submitted to the pc running the Apache server. Also, you will have to modify your firewall to permit these connections.

First wherever you bought your domain, you have to enter in the DNS controls and hang an "A" record pointing to that particular public Ip of yours. It will require a while to propagate, but to simply accept you need to setup an online host.

http://httpd.apache.org/docs/2.0/vhosts/examples.html

Inside your apache config (/etc/apache2/apache2.conf) Find these values and hang them.

  • Listen 80
  • NameVirtualHost *:80

Then you will have to setup an online host. Within the command line type these out and become conscious of "yourdomain", "your_primary_site_folder" you need to replace by using relevant products.

 cd /etc/apache2/sites-available

Then edit your file

sudo nano yourdomain.com.conf

Now paste within this and edit it for your needs:

< VirtualHost *:80 >

DocumentRoot /var/www/your_main_site_folder

ServerName www.yourdomain.com  

< /VirtualHost >

Once you are done type Control+O in order to save and Control+X to exit the nano editor.

Then within the command line again type:

sudo a2ensite yourdomain.com.conf

Then reload apache, and you are done.

sudo /etc/init.d/apache2 reload