Jump to content

[Beginner] htacces not being read by apache


Kitch
 Share

Recommended Posts

Hey there, im quite new to the whole backend thing. im mostly a frontend type. But i wanted to host a few low traffic sites on a vps i rented. So i setup a vps using ubuntu 22.04. i installed apache2 and then followed a guide to create a few websites. this all works quite well. Now the problem comes when i tried installing processwire onto the first site. The installation went fine and it shows me the starting page with some home text.

spacer.png

 

but when i try to call for the admin page using /cp/ in my case it gives me a 404 error.

spacer.png

I looked on the internet and people said to test my htacces file. and when i add some random text in it. the site stays the same. so the htacces isn't being read. i already change basically all .conf files in my virtualhosts to say "AllowOverride All".

 

Below ill have a photo of my structure and files. please help me out here.

spacer.png

 

spacer.png

This below is the virtualhost of my kitchdesign.nl.conf file in /sites-available/

spacer.png

 

Link to comment
Share on other sites

I have found my particular mistake, for other people wanting to know how to fix this in similar situations.

I went to the apache2 folder and editted the apache2.conf

in that folder there's this piece of code. In here you should edit the AllowOverride to All aswell. i changed all of them. but thats probably not necessary. by the looks of it you should only have to change the one with directory /var/www/

spacer.png

 

I hope this helps other people

  • Like 1
Link to comment
Share on other sites

Hello,

1 hour ago, Kitch said:

by the looks of it you should only have to change the one with directory /var/www/

Yes I think this is enough.

Other way is to change it only for this web site, in your apache site configuration if you have created one (/etc/apache2/sites-available/).

2 hours ago, Kitch said:

im mostly a frontend type. But i wanted to host a few low traffic sites on a vps i rented. So i setup a vps using ubuntu 22.04.

This is a good idea to do this yourself, I like it too, with a bit of practice and google searches you'll know how to configure a web environment by yourself, modifying apache config, enabling/disabling a site, setting up php, php-fpm, etc. This is also useful when setting up environments under Windows. 🙂

But Ubuntu is useless on a server, it takes a lot of memory for nothing. Usually we only need Debian and a SSH console (or several consoles for multi-tasking), and this is often faster than using a desktop. 🙂

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...