0

I apologize in advance if this has been asked/answered already! I assure you, I did explore the question extensively before I asked.

What I am dealing with is pretty simple, but I am not actually sure it is an issue of port, though that is the only thing different.

I develop and host on the same machine. I run 2 actual websites (vhosts) that work fine once the code (cakePHP) is in production. But, when I debug in development (using PHP built-in server on 8080), I don't get any .htaccess response (mod_rewrite doesn't work).

I have the documentroot and directory set to my development folders in httpd.conf, and then of course my virtual hosts set up separately. As I mentioned, once the code is deployed to their production folders, everything works fine and as expected. My only issue is using localhost:8080 - it works, but rewriting isn't happening (so css, etc doesn't get loaded).

The title of the question assumes that the issue is the port. I haven't tried turning off apache and using PHP built in server on 80 to see if that works because my deployed apps are pretty much in constant use... I am considering firing up a virtual machine with the exact config and testing that theory, but I thought I would ask and see if anyone has any experience with particular problem.

Ultimately, it is not a deal breaker! It is just development, I can still test apps and pages, just have to do some manual URL hunting. Just curious if this is really a port problem or a problem with PHP built in server.

thanks

  • mod_rewrite works on whatever port apache is listening to. I use on 8080 everyday, However I would avoid localhost its better to use 127.0.0.1 unless you like dealing with IPv6 Win7 is IPV6 I think they fixed that better in other versions of windows, but It might just be my hosts file transfered when I upgraded ... lol – ArtisticPhoenix Jun 29 '16 at 02:59
  • @ArtisiticPhoenix - I appreciate the comment. I am using Arch Linux, and though I did very enthusiastically try the IP thing, it didn't work. Still having the same problem. I KNOW whatever the issue is, it is a simple fix and I am going to kick myself when I figure it out. –  Jun 29 '16 at 03:17
  • 1
    Please checkout http://stackoverflow.com/questions/27381520/php-built-in-server-and-htaccess-mod-rewrites hope this will help you. – Haresh Kumar Jun 29 '16 at 04:10
  • @HareshKumar Yes, thanks. I realized this almost as soon as I asked the question (the answer is in the question)... PHP built in server doesn't access Apache mods! –  Jun 29 '16 at 20:11

0 Answers0