Answer the question
In order to leave comments, you need to log in
Why is localhost not working?
I installed apache + php on Ubuntu for the first time, I wanted to display index.php at the new address
at: /domains/localhost
posted index.php
changed the file at: /etc/apache2/sites-available/000-default.conf
to new content :
<VirtualHost *:80>
#ServerName www.example.com
ServerAdmin [email protected]
DocumentRoot /domains/localhost/
ErrorDocument 404 /index.html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
127.0.0.1 localhost
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question