Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed May 04, 2011 5:22 am 
Offline
Senior Newbie

Joined: Wed Apr 27, 2011 7:54 am
Posts: 11
Hi,

I have a default install of Apache 2 on one of my linodes and I'd like to preview my apps before setting a domain to them. I read the following post about previewing the app/site on a subdomain — but I would like to know if it's possible to view it using a specific port number and if so could someone point me in the right direction on how to go about setting this up?

Or if anyone can offer a better method for previewing dev work?

I was thinking something like exampleport.com:4605 would be useful.

Many thanks,
Gavin


Top
   
 Post subject:
PostPosted: Wed May 04, 2011 10:40 am 
Offline
Senior Member

Joined: Wed Jul 21, 2010 8:04 pm
Posts: 119
I would recommend modifying your local PC's host file.


Top
   
 Post subject:
PostPosted: Thu May 05, 2011 7:14 am 
Offline
Senior Newbie

Joined: Wed Apr 27, 2011 7:54 am
Posts: 11
Good suggestion, I have it setup like that at the moment. If I wanted to let others view it though, could I assign a port number to it?


Top
   
 Post subject:
PostPosted: Thu May 05, 2011 7:43 am 
Offline
Senior Newbie

Joined: Wed Apr 27, 2011 7:54 am
Posts: 11
Ok, I figured out what I need to do.

Following both of these links...

http://httpd.apache.org/docs/2.2/bind.html

http://httpd.apache.org/docs/2.2/vhosts ... .html#port

I realised that I had to add the port for Apache to listen out for and then specify it in the virtual host file for that domain.

For example:

Inside /etc/apache2/ports.config

Code:
...

NameVirtualHost 12.34.56.78:80
Listen 80
# Add port you want to use
Listen 8080

...


Inside /etc/apaches2/sites-available/exampledomain.com

Code:
# Spedify the port number
<VirtualHost 12.34.56.78:8080>

...


And don't forget to reload Apache.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group