PDA

View Full Version : Clean install version 4.6.0 problems



Kimmo Pennanen
December 12, 2017, 02:26 PM
Hi Flynax team,

I just made a new clean install with version 4.6.0. install package.

Everything in installation went OK, but when opening the site none of the links on the main page work.

Search on Map, Search, Recently Added, Property, Agents etc.

And corresponding URLs "search-on-map.html", "search.html", etc. gives

404Not Found

The requested URL /index.php was not found on this server.

Apache/2.4.18 (Ubuntu) Server at www.xxxxxxxx.com Port 443

Even though the front page index.php works fine.

Any ideas?

Viktor
December 12, 2017, 03:21 PM
Hello Kimmo,

WOuld you please send ftp access to my PM I will try to check it asap.

Wei Hong
December 12, 2017, 03:44 PM
I think you forgot to upload the .htaccess file which is hidden. For now you can go to admincp basic setting and turn Apache rewrite module off or disable it. Your site will works OK. If you want Apache rewrite module to work of course you need the .htaccess file uploaded

Kimmo Pennanen
December 13, 2017, 08:55 AM
Thanks Wei Hong, turning Apache rewrite module off from the admincp helped.


Still I would like to use Apache rewrite module and it was enabled when installing the Flynax 4.6.0. AND installation wrote the .htaccess file during the installation. Maybe Viktor could comment what is wrong with it? The original .htaccess file fresh after installation below:




# Configures the footer on server-generated documents
ServerSignature Off


# enable apache morRewrite module
RewriteEngine on


# The URL prefix to be used for per-directory
RewriteBase /


# Block BAD user agents
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:craftbot@yahoo.com [OR]
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]
RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR]
RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR]
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR]
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR]
RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR]
RewriteCond %{HTTP_USER_AGENT} ^HMView [OR]
RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR]
RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR]
RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR]
RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR]
RewriteCond %{HTTP_USER_AGENT} ^larbin [OR]
RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR]
RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR]
RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR]
RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR]
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR]
RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR]
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR]
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR]
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR]
RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR]
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Widow [OR]
RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus
# Note: The final RewriteCond must NOT use the [OR] flag.


# Return 403 Forbidden error.
RewriteRule .* index.php [F]


# The following rules are for bandwidth-hogging download tools
<IfModule mod_setenvif.c>
SetEnvIf user-agent "libwww-perl" stayout=1
SetEnvIf user-agent "Download Demon" stayout=1
SetEnvIf user-agent "GetRight" stayout=1
SetEnvIf user-agent "GetWeb!" stayout=1
SetEnvIf user-agent "Go!Zilla" stayout=1
SetEnvIf user-agent "Go-Ahead-Got-It" stayout=1
SetEnvIf user-agent "GrabNet" stayout=1
SetEnvIf user-agent "TurnitinBot" stayout=1


# This line denies access to all of the above tools
deny from env=stayout
</IfModule>


# Block possible mySQL injections
RewriteCond %{REQUEST_METHOD} ^(PUT|CONNECT|HEAD|TRACE|TRACK) [NC,OR]
RewriteCond %{THE_REQUEST} (\\r|\\n|%0A|%0D) [NC,OR]
RewriteCond %{HTTP_REFERER} (<|>|'|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
RewriteCond %{HTTP_COOKIE} (<|>|'|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
RewriteCond %{REQUEST_URI} ^/(,|;|:|<|>|">|"<|/|\\\.\.\\).{0,9999} [NC,OR]
RewriteCond %{QUERY_STRING} (;|<|>|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|updat e|md5|benchmark) [NC,OR]
RewriteCond %{QUERY_STRING} (localhost|loopback|127\.0\.0\.1) [NC,OR]
RewriteCond %{QUERY_STRING} (<|>|'|%0A|%0D|%27|%3C|%3E|%00) [NC]
# Note: The final RewriteCond must NOT use the [OR] flag.


# Return 403 Forbidden error.
RewriteRule .* index.php [F]


# set files headers
<IfModule mod_headers.c>
<FilesMatch "\.(png|gif|jpg|jpeg|woff)$">
Header set Cache-Control "max-age=5356800, public, must-revalidate"
</FilesMatch>


<FilesMatch "\.(css|js)$">
Header set Cache-Control "max-age=2678400, public, must-revalidate"
</FilesMatch>
<FilesMatch "\.(js|css|xml|gz)$">
Header append Vary: Accept-Encoding
</FilesMatch>
Header append Connection keep-alive
<FilesMatch ".(eot|ttf|otf|woff)">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>


# deflate static content
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/x-component text/css application/x-javascript application/javascript
</IfModule>


# http://httpd.apache.org/docs/2.2/mod/mod_expires.html
<ifmodule mod_expires.c>
<filesmatch ".(css|js|png|gif|jpg|jpeg|htc)$">
ExpiresActive on
ExpiresDefault "access plus 1 year"
</filesmatch>
</ifmodule>


# allow request methods
<Limit POST PUT DELETE GET OPTIONS HEAD>
Order deny,allow
Allow from All
</Limit>


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/templates
RewriteRule templates\/(.*?\/)(.*)$ templates/template_core/$2 [L]


RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [L]


ErrorDocument 404 /404.html


# non .html redirect
#RewriteCond %{REQUEST_URI} !(\.[a-z]+)$ [NC]
#RewriteRule ^([^\/]{3,})/$ http://%{HTTP_HOST}/$1.html [NC,L,R=301]


# non trailing redirect
#RewriteCond %{REQUEST_URI} !(\.[a-z]+|[\/]|\?.+)$ [NC]
RewriteCond %{REQUEST_URI} !(\.[a-z]+|[\/])$ [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI}/ [NC,L,R=301]


# define system languages
#RewriteRule ^([a-zA-Z]{2})$ index.php?page=$1 [QSA,L]


# define paging
RewriteRule ^([^//]+)/?(.*)?/index([0-9]*).html$ index.php?page=$1&rlVareables=$2&pg=$3 [QSA,L]


# define listing
#RewriteRule ^(([\w\-\_]+)?/)([^/]+)(/.+)-l?([0-9]+).html$ index.php?page=$2&rlVareables=$3$4&listing_id=$5 [QSA,L]
RewriteRule ^([^/]+)(/?(.{2,}))?-l?([0-9]+).html$ index.php?page=$1&rlVareables=$3&listing_id=$4 [QSA,L]




# wildcard request
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_URI} ^\/
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} !^m\. [NC]
#RewriteCond %{HTTP_HOST} \.{2,} [NC] # 1 is localhost usage, 2 is global usage
RewriteCond %{HTTP_HOST} ^([^\.]+)\..+\.+ [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+) [NC]
RewriteRule (.*) index.php?page=%1&wildcard&rlVareables=$1 [QSA,L]


# account request (sub-directory)
RewriteRule ^((\w{2})/)?([\w-_]{3,})$ index.php?page=$3&lang=$2&account_request [QSA,L]


# define single pages
RewriteRule ^([^//]+)/?(^/*)?.html$ index.php?page=$1 [QSA,L]


# define other pages
RewriteRule ^([^//]+)/?(.*)?/?(.*)?(.html|/+)$ index.php?page=$1&rlVareables=$2 [QSA,L]


# Google and Yahoo sitemap
RewriteRule ^([a-z_]*)?sitemap([0-9]*).xml$ plugins/sitemap/sitemap.php?search=google&number=$2&mod=$1 [QSA,L]
RewriteRule ^yahoo-sitemap.txt$ /plugins/sitemap/sitemap.php?search=yahoo [QSA,L]
RewriteRule ^urllist.txt$ /plugins/sitemap/sitemap.php?search=urllist [QSA,L]

Kimmo Pennanen
December 13, 2017, 04:16 PM
Another interesting problem: After working on the site for whole day, suddenly the admin login page (https://xxxxx.xxx/admin) doesn't work anymore. When typing the login and password it just refreshes the page. Login in from another computer works fine, but for how long I am not sure and then I'll be logged out from my site :-/ Any ideas?

Wei Hong
December 13, 2017, 04:21 PM
Did you install flynax on root? Like www.domain.com.
Or did you install it on sub folder like www.domain.com/flynax/

If you installed it on sub folder make sure to add # The URL prefix to be used for per-directory
RewriteBase /subfolder/
in your .htaccess file.

For admin problem sounds like caching issue. Turn any caching functions off. Like cloudflare?

Kimmo Pennanen
December 13, 2017, 04:35 PM
Thanks Wei Hong!

I installed flynax to a subfolder, but I used Apache virtual configuration file to point to subfolder when accessing www.domain.com and it works great.

Like this:

<VirtualHost *:443>
ServerAdmin admin@domain.com
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /var/www/html/flynax/
ErrorLog ${APACHE_LOG_DIR}/error-com.log
CustomLog ${APACHE_LOG_DIR}/access-com.log combined

<Directory /var/www/html/flynax/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>

The admin login issue is a mystery. The issue persists even when using Chrome's incognito mode. I also installed a fresh Firefox and still the same problem.

Edit: I get this from browser

"This page isn’t working

www.domain.com redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS

Too many redirects occurred trying to open
“https://www.domain.com/index.php?page=add-listing”. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page."

Maybe this redirecting is causing the issue?

Wei Hong
December 14, 2017, 06:23 AM
OK so they are the same problem. Open your htaccess file and find this line, should be near the top

# The URL prefix to be used for per-directory
RewriteBase /

Add the name of the subfolder
# The URL prefix to be used for per-directory
RewriteBase /subfoldername/

The admin issue is also coming from this pointing access. For this matter I don't know if there is a solution you should open a ticket.

Kimmo Pennanen
December 14, 2017, 10:30 AM
Thank you Wei Hong for your help, I really appreciate it.

I did what you suggested, but unfortunately with no effect. Made a ticket for Flynax team ...

Brian Jester
March 20, 2018, 11:36 PM
Thanks Wei Hong!

I installed flynax to a subfolder, but I used Apache virtual configuration file to point to subfolder when accessing www.domain.com and it works great.

Like this:

<VirtualHost *:443>
ServerAdmin admin@domain.com
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /var/www/html/flynax/
ErrorLog ${APACHE_LOG_DIR}/error-com.log
CustomLog ${APACHE_LOG_DIR}/access-com.log combined

<Directory /var/www/html/flynax/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>

..snip


Just so everyone is aware, the above code is also required for v4.6.1 but it does in fact work! I have made sure my .htaccess file was pointing to the correct install folder on the server, and that alone did NOT work, but the Virtual Host code above when put into my 000-default.conf file on Ubuntu 16.04 does in fact work!

Thank you for that! :)