Wednesday 23rd March 2016 14:23

After running the install module on zenario 7.1.2, I get a message that states:

Friendly URLs are not supported (this is optional, but recommended). Please check your Apache configuration (that the mod_rewrite module is enabled), and that your Zenario directory contains the .htaccess file.

mod_rewrite is enabled in apache:

 

$ apachectl -MLoaded Modules: core_module (static) so_module (static) watchdog_module (static) http_module (static) log_config_module (static) logio_module (static) version_module (static) unixd_module (static) access_compat_module (shared) alias_module (shared) auth_basic_module (shared) authn_core_module (shared) authn_file_module (shared) authz_core_module (shared) authz_host_module (shared) authz_user_module (shared) autoindex_module (shared) deflate_module (shared) dir_module (shared) env_module (shared) filter_module (shared) mime_module (shared) mpm_prefork_module (shared) negotiation_module (shared) php5_module (shared) rewrite_module (shared) setenvif_module (shared) status_module (shared)

 

After reading the documentation here: http://zenar.io/image_caching_and_compression I learn that there should be a htaccess.txt file somewhere, but it doesn't exist.

 

$ whereis htaccess.txthtaccess:

 

I'm not sure how to resolve this as there's no further documentation on the htaccess file that I can find despite copious amounts of googling.

Wednesday 23rd March 2016 16:54

Hi Dmizer,

 

The .htaccess file is found in the zenario root directory:

 

[email protected]:~/dev/Zenario-7.1$ ls -la

total 72

drwxrwxr-x  9 matthewh matthewh 4096 Oct 28 16:18 .

drwxrwxr-x 45 matthewh matthewh 4096 Jan 20 12:41 ..

drwxrwxr-x  2 matthewh matthewh 4096 Oct 14 13:08 cache

-rwxrwxr-x  1 matthewh matthewh  936 Oct 14 13:08 CONTRIBUTING.md

-rw-rw-r--  1 matthewh matthewh   98 Oct 14 13:08 developer.txt

-rw-rw-r--  1 matthewh matthewh 2676 Oct 28 10:03 .htaccess

-rw-rw-r--  1 matthewh matthewh 2697 Oct 28 10:03 htaccess_for_tildes_in_home_dir.txt

-rw-rw-r--  1 matthewh matthewh   37 Oct 14 13:08 index.php

-rw-rw-r--  1 matthewh matthewh  101 Oct 14 13:08 js_minify

drwxrwxr-x  2 matthewh matthewh 4096 Oct 14 13:08 private

drwxrwxr-x  2 matthewh matthewh 4096 Oct 14 13:08 public

-rwxrwxr-x  1 matthewh matthewh 4025 Oct 14 13:08 README_INSTALL.md

-rw-rw-r--  1 matthewh matthewh 2294 Oct 14 13:08 README.md

-rw-rw-r--  1 matthewh matthewh  238 Oct 14 13:08 robots.txt

drwxrwxr-x  4 matthewh matthewh 4096 Jan 20 12:41 .svn

drwxrwxr-x 10 matthewh matthewh 4096 Dec 14 09:55 zenario

drwxrwxr-x  3 matthewh matthewh 4096 Oct 14 13:08 zenario_custom

drwxrwxr-x 63 matthewh matthewh 4096 Oct 14 13:08 zenario_extra_modules

 

 

Note that it is a hidden file so you need to include the -a option when listing files.

 

Also see this page http://zenar.io/search-engine-friendly-urls

 

Hope that helps

 

Many thanks,

Matt

 

Thursday 24th March 2016 02:35

Ok ... how do I correctly parse text here? This is maddening.

 

Nope:

 

$ ls -latotal 64drwxr-xr-x  7 root     root     4096 Mar 23 12:00 .drwxr-xr-x  3 root     root     4096 Mar 23 10:13 ..-rw-r--r--  1 www-data www-data  955 Mar 23 11:42 CONTRIBUTING.md-rw-r--r--  1 www-data www-data 2294 Mar 23 11:42 README.md-rw-r--r--  1 www-data www-data 4025 Mar 23 11:42 README_INSTALL.mddrwxrwxr-x  8 www-data www-data 4096 Mar 23 11:56 cache-rw-r--r--  1 www-data www-data 2768 Mar 23 11:42 htaccess_for_tildes_in_home_dir.txt-rw-r--r--  1 www-data www-data   37 Mar 23 11:42 index.php-rw-r--r--  1 www-data www-data 1520 Mar 23 11:42 license.txtdrwxrwxr-x  5 www-data www-data 4096 Mar 23 11:56 privatedrwxrwxr-x  4 www-data www-data 4096 Mar 23 11:56 public-rw-r--r--  1 www-data www-data  247 Mar 23 11:42 robots.txtdrwxr-xr-x 10 www-data www-data 4096 Mar 23 12:02 zenariodrwxr-xr-x  5 www-data www-data 4096 Mar 23 11:42 zenario_custom-rwxrwxr-x  1 www-data www-data 4817 Mar 23 12:07 zenario_siteconfig.php

Thursday 24th March 2016 06:59
Matthew Holtom said:

Also see this page http://zenar.io/search-engine-friendly-urls

 Turned on "Use mod_rewrite" in the Site settings, and now my whole site is broken. I'm getting a 404, presumably because I have no htaccess file.

Thursday 24th March 2016 08:46

htaccess file attached.

 

Make sure you rename to .htaccess

 

Hope that helps,

Matt

Thursday 24th March 2016 12:49

Thanks for that.

 

Completely hosed my install. Even with the .htaccess file in place, it was impossible to reach my site. Upon reinstall (with your included .htaccess file) the install script still says that friendly URLs are not supported:

Friendly URLs are not supported (this is optional, but recommended). Please check your Apache configuration (that the mod_rewrite module is enabled), and that your Zenario directory contains the .htaccess file.

I assume this is what borked my previous install. Any further ideas?

 

$ ls -latotal 60drwxr-xr-x 7 root root 4096 Mar 24 21:30 .drwxr-xr-x 3 root root 4096 Mar 23 10:13 ..-rw-rw-r-- 1 www-data www-data 2676 Mar 24 16:00 .htaccess-rw-r--r-- 1 www-data www-data 955 Mar 24 21:30 CONTRIBUTING.md-rw-r--r-- 1 www-data www-data 2294 Mar 24 21:30 README.md-rw-r--r-- 1 www-data www-data 4025 Mar 24 21:30 README_INSTALL.mddrwxrwxr-x 8 www-data www-data 4096 Mar 24 21:34 cache-rw-r--r-- 1 www-data www-data 2768 Mar 24 21:30 htaccess_for_tildes_in_home_dir.txt-rw-r--r-- 1 www-data www-data 37 Mar 24 21:30 index.php-rw-r--r-- 1 www-data www-data 1520 Mar 24 21:30 license.txtdrwxrwxr-x 5 www-data www-data 4096 Mar 24 21:34 privatedrwxr-xr-x 4 www-data www-data 4096 Mar 24 21:34 public-rw-r--r-- 1 www-data www-data 247 Mar 24 21:30 robots.txtdrwxr-xr-x 10 www-data www-data 4096 Mar 24 21:30 zenariodrwxr-xr-x 5 www-data www-data 4096 Mar 24 21:30 zenario_custom-rw-rw-r-- 1 www-data www-data 0 Mar 24 21:30 zenario_siteconfig.php

 

Sorry, I really can't figure out how to format terminal text output correctly on this forum.

Thursday 24th March 2016 13:55

Hi dmizer!

 

I think there are two problems here. Obviously you're having problems pasting things from your Linux terminal into this forum. I'm sorry about that. May I just ask, are you using a Mac or Windows to connect to Linux via ssh? Or are you using a Linux machine directly?

 

Thanks for your patience with that, if you can let us know, that will help us write a patch for the forum.

 

Then the main problem, about using your site. A number of things need to be in place in order for .htaccess to be read.

 

For a start, you must have Apache to be permitted to actually pay attention to .htaccess files. That is probably done in either a global apache.conf file, or in a virtual host file, like I have here:

 

<VirtualHost *:80>

        ServerName yoursite.tribalsystems.uk

 

        ServerAdmin [email protected]

 

        DocumentRoot /var/www/clients/yoursite/public_html

        <Directory /var/www/clients/yoursite/public_html/>

                AllowOverride All

                Order allow,deny

                allow from all

        </Directory>

</VirtualHost>

 

Notice that line "AllowOverride All", it is often set to "None", in which case Apache is being told to not follow any instructions from .htaccess.

 

Apart from that as you've spotted you must have mod_rewrite enabled (which you seem to).

 

Does that help?

 

 

 

Saturday 26th March 2016 13:02
Tony Butcher said:

Hi dmizer!

 

I think there are two problems here. Obviously you're having problems pasting things from your Linux terminal into this forum. I'm sorry about that. May I just ask, are you using a Mac or Windows to connect to Linux via ssh? Or are you using a Linux machine directly?

 

Thanks for your patience with that, if you can let us know, that will help us write a patch for the forum.

 I'm using a Linux machine directly, but my server is running in a VM, so I'm also copying text from a terminal connected via SSH.

 

For a start, you must have Apache to be permitted to actually pay attention to .htaccess files. That is probably done in either a global apache.conf file, or in a virtual host file, like I have here:

 

I completely forgot about creating a virtual hosts file. I've been using lighttp for so long I've forgotten a lot about Apache. I feel like an idiot now. Thanks for the help.

Tuesday 29th March 2016 15:58
dmizer said:

Ok ... how do I correctly parse text here? This is maddening.

Sorry about that, it was just a little bug in our forums, it should be fixed now!

You must confirm your screen name on your profile in order to comment.

Please Login if you wish to add a message.