-1

I have installed lamp on debian8 and wordpress on /var/www/html/wp.
Now the /var/www/html was on the machine which ip is 192.168.1.100 on the family lan.

vim  /etc/apache2/sites-available/000-default.conf
<VirtualHost 192.168.1.100:80>
    ServerName  mywp.com
    DocumentRoot /var/www/html/wp
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Why my wordpress can't be visited when to input mywp.com' in firefox? How to create a domain name to use in my family lan? And bind the domain namemywp.com` with 192.168.1.100?

1

1 Answer 1

0

If you want to use a domain, you have to buy one, then point the DNS records to your public IP address.

If you want to use a domain locally, you must edit the hosts files for each device you want to be able to access the site.

Editing Windows Hosts Files in Windows:

Add the following line into %SystemRoot%\System32\drivers\etc\hosts

192.168.1.100     mywp.com

Pointing a domain

This heavily depends on the registrar you use, but you want to add an A domain record with the following settings:

Host: @
IP Address: your-public-IP

You can also add another A Record for your site to be accessible with www. infront:

Host: www
IP Address: your-public-IP

More info here: How can I point my domain name to my home server's IP?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .