1

ATTN! I should mention this is all localhost. As in my machine, no servers or other jazz included.

I am really bad at configuring sites in apache, how ever I have the following config:

<VirtualHost *:80>

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/image_upload_app
        ServerAlias www.dev-imageuploadapp.com

        <Directory /var/www/html/image_upload_app>
            Options Indexes FollowSymLinks
            AllowOverride All
            Order allow,deny
            allow from all
        </Directory>


        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

And when ever I visit www.dev-imageuploadapp.com, I get a "The web page is not available" in chrome.

There are no errors in the access or the error log, after attempting to visit the page. Apache is running and the site is enabled.

The directory does exist and contains a index.php.

2 Answers 2

1

You need to set ip address of your site on DNS Servers. There is some free DNS Servers like https://www.cloudflare.com/. If you do in this way, you need to set delegated DNS Servers on your domain-holder site. Another try you can go to site to IP by http://{your-ip-address}/

Your browser needs to know which IP address is to use for a provided name. To enforce some values to localhost, you can add them into hosts file. Following line needs to be added:

127.0.0.1   www.dev-imageuploadapp.com
Sign up to request clarification or add additional context in comments.

4 Comments

this is all being done on local host so why would I need that? Updated question to reflect that its Localhost
Okay, than add to /etc/hosts following line: 127.0.0.1 www.dev-imageuploadapp.com
For windows: %SystemRoot%\system32\drivers\etc\hosts
@vanadium23 You should probably add this to your answer rather than in the comments for others to view :)
1

In /etc/hosts change the line:

127.0.0.1   localhost 

To

127.0.0.1   localhost www.dev-imageuploadapp.com

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.