M
M
Maxim Ivanov2015-12-22 19:16:15
Apache HTTP Server
Maxim Ivanov, 2015-12-22 19:16:15

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>

in etc/hosts file
127.0.0.1 localhost
But it doesn't work!
6b1f33c01bf64b9da3357d3e1a0cf511.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2015-12-22
@vintello

why does not it work ? works. normal language writes that there are no rights.
try sudo chmod 777 index.php to execute in the folder with the index.php file,
only this is full rights to the file and this cannot be done for the web. but it's fine for playing

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question