Possible to preview website at specific port number?
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
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
3 Replies
Following both of these links…
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
...
NameVirtualHost 12.34.56.78:80
Listen 80
# Add port you want to use
Listen 8080
...
Inside /etc/apaches2/sites-available/exampledomain.com
# Spedify the port number
<virtualhost 12.34.56.78:8080="">...</virtualhost>
And don't forget to reload Apache.