can i activate .htaccess with my ipaddress and not a domain name?

the tutorial indicates that i have to update
sudo nano /etc/apache2/sites-available/example.com.conf where example.com is my ipaddress
this doesn't work as it opens a new file.
i discovered the config file is 000-default.conf and making modification to this file doesn't solve the problem
i added the following to the block

<directory example.com="" html="" public_html="" var="" www=""> Options Indexes FollowSymLinks AllowOverride All Require all granted </directory>

1 Reply

Formatting added…

the tutorial indicates that i have to update
sudo nano /etc/apache2/sites-available/example.com.conf where example.com is my ipaddress
this doesn't work as it opens a new file.

Of course it does… That's what nano does when you ask it to edit a file that doesn't exist.

i discovered the config file is 000-default.conf and making modification to this file doesn't solve the problem
i added the following to the block

 

<directory example.com="" html="" public_html="" var="" www=""> Options Indexes FollowSymLinks AllowOverride All Require all granted </directory>

This is not a valid <Directory> directive. See:

https://httpd.apache.org/docs/2.4/mod/core.html#directory

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct