PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, September 22, 2022

[FIXED] Why does localhost work but my alias does not?

 September 22, 2022     apache2, virtualhost, wordpress     No comments   

Issue

I currently have this apache2 site configuration:

<VirtualHost *:80>
    ServerAdmin admin@example.com
    ServerName engine.com
    ServerAlias www.engine.com
    DocumentRoot /var/www/engine.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

If I type engine.com I just get a blank page.

My directory setup is like this

/var/www/engine.com/public_html/wp-content...

Localhost works fine and wordpress installation is triggered, but as I say engine.com just brings me a blank page.


Solution

Don't you need to add

engine.com 127.0.0.1

to your hosts file?



Answered By - PersyJack
Answer Checked By - Cary Denson (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing