Can't access Joomla after NAS migration

Got a question about our NAS utilities? The answer lies within.

Moderator: Lillian.W@AST

Post Reply
gloops100
Posts: 28
youtube meble na wymiar Warszawa
Joined: Sat Dec 28, 2013 5:04 am

Can't access Joomla after NAS migration

Post by gloops100 »

Hello,

I used Joomla on my NAS since 4 years without issue.

Today I've change my NAS to a new one (AS604T => AS7004T).

All my data and configuration was kept.
.htaccess are always here

But I can't access to Joomla admin page or my website.
When I want to connect to my website, I've this browser error :

Access forbidden!
[an error occurred while processing this directive] You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

I've modified permissions :
All the directories to 755 (drwxr-xr-x):

Code: Select all

find /Web -type d -exec chmod 755 {} \;
All the files to 644 (-rw-r--r--):

Code: Select all

find /Web -type f -exec chmod 644 {} \;
So it's maybe related to my .htaccess.
It's like this :

Code: Select all

## No directory listings
IndexIgnore *

## Can be commented out if causes errors, see notes above.
Options +FollowSymlinks
Options -Indexes

## Mod_rewrite in use.

RewriteEngine On 
RewriteRule ^$ sub/ 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ joomla3-3.4.1/$1 

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://mywebsite.com/$1 [R=301,L]

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

RewriteBase /

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##



## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script

RewriteCond %{REQUEST_URI} !^/index\.php

# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f

# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d

# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.

Could you please help me to solve this issue ?
=> access to my website
=> access to Joomla admin page
Asustor AS-7004T i5 8go
4 x 3To ==> Raid5
Marco@ASUSTOR
Posts: 100
Joined: Mon Feb 12, 2018 4:40 pm

Re: Can't access Joomla after NAS migration

Post by Marco@ASUSTOR »

gloops100 wrote:Hello,

I used Joomla on my NAS since 4 years without issue.

Today I've change my NAS to a new one (AS604T => AS7004T).

All my data and configuration was kept.
.htaccess are always here

But I can't access to Joomla admin page or my website.
When I want to connect to my website, I've this browser error :

Access forbidden!
[an error occurred while processing this directive] You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

I've modified permissions :
All the directories to 755 (drwxr-xr-x):

Code: Select all

find /Web -type d -exec chmod 755 {} \;
All the files to 644 (-rw-r--r--):

Code: Select all

find /Web -type f -exec chmod 644 {} \;
So it's maybe related to my .htaccess.
It's like this :

Code: Select all

## No directory listings
IndexIgnore *

## Can be commented out if causes errors, see notes above.
Options +FollowSymlinks
Options -Indexes

## Mod_rewrite in use.

RewriteEngine On 
RewriteRule ^$ sub/ 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ joomla3-3.4.1/$1 

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://mywebsite.com/$1 [R=301,L]

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

RewriteBase /

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##



## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script

RewriteCond %{REQUEST_URI} !^/index\.php

# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f

# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d

# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.

Could you please help me to solve this issue ?
=> access to my website
=> access to Joomla admin page
Hi! Have you tried uninstalling it and reinstalling it?
gloops100
Posts: 28
Joined: Sat Dec 28, 2013 5:04 am

Re: Can't access Joomla after NAS migration

Post by gloops100 »

Hi !

Yes I already tried to desinstall/reinstall Joomla in App Central.

Is it possible to reinstall Apache ? or check if all the system is OK ?
Asustor AS-7004T i5 8go
4 x 3To ==> Raid5
Marco@ASUSTOR
Posts: 100
Joined: Mon Feb 12, 2018 4:40 pm

Re: Can't access Joomla after NAS migration

Post by Marco@ASUSTOR »

gloops100 wrote:Hi !

Yes I already tried to desinstall/reinstall Joomla in App Central.

Is it possible to reinstall Apache ? or check if all the system is OK ?
I don't know Joomla all that well. I'll have to ask around to see what dependencies Joomla uses and see if they need to be reinstalled.

One thing I like to do if something doesn't translate properly is if you have access to a spare drive, to take the drives out, pop in a new drive, install it and install Joomla and see if it works. If so, then It'll at least narrow down the problem.
gloops100
Posts: 28
Joined: Sat Dec 28, 2013 5:04 am

Re: Can't access Joomla after NAS migration

Post by gloops100 »

It will work with my other NAS.

One more important things : before this issue web server doesn't work !

I need to do this :

In CLI :

Code: Select all

sudo /volume0/usr/builtin/etc/init.d/S54apache2 start
Error :

Code: Select all

apache2: Syntax error on line 56 of /usr/builtin/etc/apache2/apache2.conf: Could not open configuration file /usr/builtin/etc/apache2/mods-enabled/authz_default.conf: No such file or directory
So I need to create manually the file "authz_default.conf"

=> After web server started (port 80 & 443)
Asustor AS-7004T i5 8go
4 x 3To ==> Raid5
gloops100
Posts: 28
Joined: Sat Dec 28, 2013 5:04 am

Re: Can't access Joomla after NAS migration

Post by gloops100 »

Hello,

I've uninstalled Joomla and make a fresh install on my NAS.

I've make the first configuration and when I want to access the website, it works not very well (CSS not present,...) :

Image

I installed Akeeba Backup to restore my website, and same thing...

Could you please help me to solve ? Do I need to completely delete the "joomla" folder in Web folder ?
Asustor AS-7004T i5 8go
4 x 3To ==> Raid5
Post Reply

Return to “NAS Utilities”