How to allow htaccess
-
- A regular
- Posts: 40
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Sat Oct 31, 2015 10:29 am
How to allow htaccess
Im wondering how do i enable htaccess, i searched some methods on google but most those methods point me to directories that i dont even have.
Im using a unmanaged linux vds with phpmyadmin+apache on it.
-Thanks
Im using a unmanaged linux vds with phpmyadmin+apache on it.
-Thanks

Re: How to allow htaccess
A ".htaccess" file is read within any web folder for Apache. For instance, perhaps you set Apache to look for your web files in something like /var/www on your server. If you placed a .htaccess file within that folder, it would be read by Apache and used for all subfolders within /var/www.
-
- A regular
- Posts: 40
- Joined: Sat Oct 31, 2015 10:29 am
Re: How to allow htaccess
Im not sure what you mean. I did some research and they showed that theirs a file that you need to allow htaccess like Allow like. From here https://www.velocihost.net/clients/know ... x-VPS.htmlSpray wrote:A ".htaccess" file is read within any web folder for Apache. For instance, perhaps you set Apache to look for your web files in something like /var/www on your server. If you placed a .htaccess file within that folder, it would be read by Apache and used for all subfolders within /var/www.
The thing is i transfered my subdomain /store from a basic nfo web hosting to my unmanaged vds and the products arent showing up, and i have the DB and files all transfered so only thing could be is htaccess not being allowed. So i want it to have access from the sudfolder domainname.com/store

Re: How to allow htaccess
Ah, so you have a .htaccess file present, but the file isn't being loaded? In that case, you will need to ensure that your Apache configuration is looking for and reading .htaccess files. The "AllowOveride" setting, as stated in your linked article, is the correct setting to alter. If you're using something like Ubuntu and its default Apache2 setup, the configuration file should be located at /etc/apache2/apache2.conf
You may see a section like this:
You'd want to change this to:
You may see a section like this:
Code: Select all
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
Code: Select all
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
-
- A regular
- Posts: 40
- Joined: Sat Oct 31, 2015 10:29 am
Re: How to allow htaccess
Ok i did that then reboot the vds and it seems like my sourcebans and the store website is down for past 20 mins and nothing is even working anymore. And my sourcebans website is going like 10x slower now since i reboot the vds, what the hell. RIP

-
- A regular
- Posts: 40
- Joined: Sat Oct 31, 2015 10:29 am
Re: How to allow htaccess
The error i get for the store is this now
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.

Re: How to allow htaccess
That usually means you have a configuration error inside your htaccess file. This file must be perfect. Apache doesn't guess what you mean - it either reads it exactly, or it finds an error and returns the 500 error.
Check it again.
Check it again.
-
- A regular
- Posts: 40
- Joined: Sat Oct 31, 2015 10:29 am
Re: How to allow htaccess
I dont get how i would have an error if it worked perfectly on my other hosting. I didnt change the htaccess file.doulos9 wrote:That usually means you have a configuration error inside your htaccess file. This file must be perfect. Apache doesn't guess what you mean - it either reads it exactly, or it finds an error and returns the 500 error.
Check it again.

Re: How to allow htaccess
Ah, OK. You need to follow the advise from spray here: viewtopic.php?p=70209#p70209.
-
- A regular
- Posts: 40
- Joined: Sat Oct 31, 2015 10:29 am
Re: How to allow htaccess
I did tho... and restarted the vds and i get that internal error i sent above.doulos9 wrote:Ah, OK. You need to follow the advise from spray here: viewtopic.php?p=70209#p70209.
EDIT: Maybe set the directory to
<Directory /var/www/html/store>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
???

-
- A regular
- Posts: 40
- Joined: Sat Oct 31, 2015 10:29 am
Re: How to allow htaccess
Just checked my apache error log and im getting this
/var/www/html/store/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
/var/www/html/store/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

-
- A regular
- Posts: 40
- Joined: Sat Oct 31, 2015 10:29 am
Re: How to allow htaccess
FIXED
Research goes a long way, so what i did was go into my VNC Console and typed sudo a2enmod rewrite then service apache2 restart and it worked!
which pretty much enables mod_rewrite and it worked flawless.
Research goes a long way, so what i did was go into my VNC Console and typed sudo a2enmod rewrite then service apache2 restart and it worked!
which pretty much enables mod_rewrite and it worked flawless.
