Vagrant port forwarding and Wordpress question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Vagrant port forwarding and Wordpress question

Ed Fidelis
Hi guys,

I just started experimenting with Vagrant and I have a question:
I like to know if it's possible to keep wordpress working when you change the forwarding port in the vagrant file without having to change all the urls in wordpress database in order to reflect the new port.

So for example if my wordpress works on http://local.test.com:8080 and I change the forwarding port in the Vagrandfile to 8081 is there any way I can keep wordpress working without having to update all the urls in the database to http://local.test.com:8081?

Many thanks for your help or any feedback you can send.
Ed
Reply | Threaded
Open this post in threaded view
|

Re: Vagrant port forwarding and Wordpress question

Mike
Since wordpress is going to respond to the client with the url:port it
knows about, you may be able to tinker with your web server (apache?)
to rewrite the response to the port you want to listen on.

On Mon, Jan 21, 2013 at 7:01 AM, Ed Fidelis <[hidden email]> wrote:

> Hi guys,
>
> I just started experimenting with Vagrant and I have a question:
> I like to know if it's possible to keep wordpress working when you change
> the forwarding port in the vagrant file without having to change all the
> urls in wordpress database in order to reflect the new port.
>
> So for example if my wordpress works on http://local.test.com:8080 and I
> change the forwarding port in the Vagrandfile to 8081 is there any way I can
> keep wordpress working without having to update all the urls in the database
> to http://local.test.com:8081?
>
> Many thanks for your help or any feedback you can send.
> Ed
Reply | Threaded
Open this post in threaded view
|

Re: Vagrant port forwarding and Wordpress question

sbrady
In reply to this post by Ed Fidelis
I dont think that you need to do any of this if you use the port forwarding from Vagrant in addition to dnsmasq. Dnsmasq will allow you to use test.com and point it to localhost, and vagrant will make the 8080 or 8081 look like the request came from port 80, therefore allowing wordpress to be configured to accept requests for test.com. Please correct me if I'm wrong on this though. 

HTH,
Sean

On Monday, January 21, 2013 5:01:04 AM UTC-7, Ed Fidelis wrote:
Hi guys,

I just started experimenting with Vagrant and I have a question:
I like to know if it's possible to keep wordpress working when you change the forwarding port in the vagrant file without having to change all the urls in wordpress database in order to reflect the new port.

So for example if my wordpress works on http://local.test.com:8080 and I change the forwarding port in the Vagrandfile to 8081 is there any way I can keep wordpress working without having to update all the urls in the database to http://local.test.com:8081?

Many thanks for your help or any feedback you can send.
Ed