Wget fetches typo3temp instead of the page tree - wget

I try to use wget to fetch the all the sites of my typo3 project. The target is to make a cronjob with this command to build the cache and the search index. While testing the command wget shows a weird behaviour.
The OS is Opensuse Tumbleweed running Apache and MySQL.
Typo3 9.5.9 was installed via composer. The composer.json is in /srv/www/typo3install, Documentroot ist /srv/www/htdocs.
The environment module of typo3 says all my permissions are ok (htaccess difference for static file cache).
This is my site configuration (config.yaml):
rootPageId: 1
base: /
baseVariants: { }
languages:
-
title: Deutsch
enabled: true
languageId: '0'
base: /
typo3Language: de
locale: de_DE.UTF-8
iso-639-1: de
navigationTitle: Deutsch
hreflang: de
direction: ''
flag: de
-
title: English
enabled: true
languageId: '1'
base: /en/
typo3Language: default
locale: en_UK.UTF-8
iso-639-1: en
navigationTitle: English
hreflang: en
direction: ''
fallbackType: fallback
fallbacks: '0'
flag: gb
errorHandling: { }
routeEnhancers:
PageTypeSuffix:
type: PageType
map:
sitemap.xml: 1533906435
routes:
-
route: robots.txt
type: staticText
content: "User-agent: *\r\n\r\n# Only allow URLs generated with RealURL\r\nDisallow: /*?id=*\r\nDisallow: /*&id=*\r\n\r\n# L=0 is the default language\r\nDisallow: /*?L=0*\r\nDisallow: /*&L=0*\r\n\r\n# typeNum = 98 is usually the print version.\r\nDisallow: /*?type=98*\r\nDisallow: /*&type=98*\r\n\r\n# Should always be protected (.htaccess)\r\nDisallow: /*/Private/*\r\nDisallow: /fileadmin/templates/html/*\r\nDisallow: /*/Configuration/*\r\n\r\nDisallow: /typo3temp/*\r\nAllow: /typo3temp/*.css\r\nAllow: /typo3temp/*.css.*.gzip\r\nAllow: /typo3temp/*.js\r\nAllow: /typo3temp/*.js.*.gzip\r\nAllow: /typo3temp/*.jpg\r\nAllow: /typo3temp/*.gif\r\nAllow: /typo3temp/*.png\r\n\r\nDisallow: *.sql\r\nDisallow: *.sql.gz\r\n\r\nDisallow: /typo3/\r\nDisallow: /typo3_src/\r\nDisallow: /template/\r\nAllow: /typo3/sysext/frontend/Resources/Public/*\r\nAllow: /template/Resources/Public/*\r\nSitemap: localhost/sitemap.xml\r\nSitemap: localhost/sitemap.xml"
disableStaticFileCache: false
The httpd.conf for the documentroot:
<Directory "/srv/www/htdocs">
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
Require local
</Directory>
The command:
wget -v -r http://localhost -P /srv/www/htdocs/typo3temp/tmpbuild
This fetches only the content of /srv/www/htdocs/typo3temp. But if I start with a subpage of the page tree the whole site gets fetched:
wget -v -r http://localhost/products/ -P /srv/www/htdocs/typo3temp/tmpbuild
I think this is not the behaviour as it should be: starting with the base URL should fetch the whole tree.
I can´t figure out if i have missed an option of wget or if there is something wrong with my configuration.
Thanks in advance,
Starger.
P.S.: Creating a hidden subpage and use this as a starting point works. But this is just a workaround.

I had to do some changes (switch to HTTP2 and SSL) on the server and the problem seems to be not present anymore.

Related

Github Pages cannot find index.html only in some directories

Update: I got fed up and re-do everything from the ground-up and it fixes itself.
I have a github pages site built with Jekyll and Chirpy theme.
Locally, it runs great.
However when deployed on Github Pages there are a few directories that return the 404 page even though the path is valid and there is an index.html file in it.
Example:
https://catmandx.github.io/posts/Wgel-CTF-Writeup/ display normally
https://catmandx.github.io/tags/cmc/index.html returns 404
http://127.0.0.1:4000/tags/cmc/index.html display correcly.
I have temporarily make the repo public, it's here: https://github.com/catmandx/catmandx.github.io
I have been banging my head for a few hours now. I have tried committing and pushing again to re-run Actions, manually editing the /tags/cmc/index.html file in the gh-pages branch but nothing works.
This is the _config.yml file, not sure if it helps but here:
# The Site Settings
# v2.0
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2017-2019 Cotes Chung
# MIT licensed
# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
# --------------------------
title: Hoang Nguyen # the main title
tagline: Simple Blog. # it will display as the sub-title
description: >- # used by seo meta and the atom feed
A minimal, portfolio, sidebar,
bootstrap Jekyll theme with responsive web design
and focuses on text presentation.
# fill in the base hostname & protocol for your site, e.g., 'https://username.github.io'
url: 'https://catmandx.github.io'
author: Hoang Nguyen # change to your full name
avatar: /assets/img/avatar.jpg # support internet resources
github:
username: catmandx # change to your github username
#twitter:
# username: twitter_username # change to your twitter username
social:
name: Hoang Nguyen # it will shows as the copyright owner in Footer
email: hhoang.nov.13#gmail.com # change to your email address
links:
# The first element serves as the copyright owner's link
# - https://twitter.com/username # change to your twitter homepage
- https://github.com/catmandx # change to your github homepage
# Uncomment below to add more social links
- https://www.facebook.com/whohoi
# - https://www.linkedin.com/in/username
# google_site_verification: google_meta_tag_verification # change to your verification string
# --------------------------
# Only if your site type is GitHub Project sites and doesn't have a custom domain,
# change below value to '/projectname'.
baseurl: ''
# Change to your timezone › http://www.timezoneconverter.com/cgi-bin/findzone/findzone
timezone: Asia/Ho_Chi_Minh
google_analytics:
id: '' # Fill with your Google Analytics ID
pv:
# The Google Analytics pageviews switch.
# DO NOT enable it unless you know how to deploy the Google Analytics superProxy.
enabled: false
# the next options only valid when `google_analytics.pv` is enabled.
proxy_url: ''
proxy_endpoint: ''
cache: false # pv data local cache, good for the users from GFW area.
disqus:
comments: false # boolean type, the global switch for posts comments.
shortname: '' # Fill with your Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
# Prefer color scheme setting.
#
# Note: Keep empty will follow the system prefer color by default,
# and there will be a toggle to switch the theme between dark and light
# on the bottom left of the sidebar.
#
# Available options:
#
# light - Use the light color scheme
#
# dark - Use the dark color scheme
#
theme_mode: # <light|dark>
# boolean type, the global switch for ToC in posts.
toc: true
paginate: 10
kramdown:
syntax_highlighter: rouge
syntax_highlighter_opts: # Rouge Options › https://github.com/jneen/rouge#full-options
css_class: highlight
# default_lang: console
span:
line_numbers: false
block:
line_numbers: true
start_line: 1
# DO NOT change this unless you're a Pro user on Jekyll and Web development,
# or you think you're smart enough to change other relevant URLs within this template.
permalink: /posts/:title/
collections:
tabs:
output: true
sort_by: order
defaults:
-
scope:
path: '' # An empty string here means all files in the project
type: posts
values:
layout: post
comments: true # Enable comments in posts.
toc: true # Display TOC column in posts.
breadcrumb:
-
label: Posts
url: /
-
scope:
path: _drafts
values:
comments: false
-
scope:
path: index.html
values:
breadcrumb:
-
label: Posts
-
scope:
path: tags
values:
breadcrumb:
-
label: Home
url: /
-
label: Tags
url: /tabs/tags/
-
scope:
path: categories
values:
breadcrumb:
-
label: Home
url: /
-
label: Categories
url: /tabs/categories/
-
scope:
path: ''
type: tabs # see `site.collections`
values:
layout: page
dynamic_title: true # Hide title in mobile screens.
breadcrumb:
-
label: Home
url: /
sass:
sass_dir: /assets/css
style: compressed
compress_html:
clippings: all
comments: all
endings: all
profile: false
blanklines: false
ignore:
envs: []
exclude:
- vendor
- Gemfile.lock
- Gemfile
- tools
- docs
- README.md
- LICENSE
- example
jekyll-archives:
enabled: [categories, tags]
layouts:
category: category
tag: tag
permalinks:
tag: /tags/:name/
category: /categories/:name/
Update: This is the log, as you can see, the files exists but all the subdirectories in /categories and /tags returns 404:
You can solve this issue by executing bash tools/init.sh
You will also have to run this init.sh every time there is a category/tag created.

TYPO3 10.4 - Locale "en_US.UTF-8" not found

I've got a problem with the language localization in TYPO3.
The site works fine, I don't get any warnings or erros in the 'normal' TYPO3-log in the backend. But every minute I got a new line in sitename/var/logs/typo3_abc.log saying
Thu, 23 Jul 2020 13:14:55 +0000 [ERROR] request="4fc10d4752ec5" component="TYPO3.CMS.Core.Localization.Locales": Locale "en_US.UTF-8" not found.
This is my config.yaml
languages:
-
title: English
enabled: true
base: /
typo3Language: default
locale: en_US.UTF-8
iso-639-1: en
websiteTitle: ''
navigationTitle: English
hreflang: en-US
direction: ''
flag: en-us-gb
languageId: '0'
Any hints or suggestions what is missing?
My system:
TYPO3 Version 10.4.5 as a container with php:7.2-apache.stretch and MariaDB Version 10.2 .
clean declaration, but does it match to your available locals?
check the list of available locales with locale -a in a shell on your system.
maybe it is written a little bit different like en_US.utf8 or en_US.utf-8 or en_US.UTF8 or ...

TYPO3 cms-indexed-search core extension missing RouteEnhancer?

we are updating an ancient TYPO3 project, we already run on TYPO3 9.5 and its looking good after alot of refactoring.
now i rework the ext:indexed_search section which got implemented into the T3Core (sysext:indexed_search). so if i disable/remove my site configuration, the search just works out of the box. once i enable our default site configuration, holding:
base: 'ourDomain'
baseVariants:
-
base: 'ourDomain'
condition: 'applicationContext == "Development"'
-
base: 'ourDomain'
condition: 'applicationContext == "Testing"'
errorHandling: { }
languages:
-
title: Deutsch
enabled: true
base: /
typo3Language: de
locale: de_DE
iso-639-1: de
navigationTitle: Deutsch
hreflang: de-DE
direction: ''
flag: at
languageId: '0'
rootPageId: 1
routes: { }
routeEnhancers:
the search does not work properly anymore. i can navigate to the search page and still have the search form and stuff but no results are shown. im dumping $search inside SearchController and saw that its actually empty no matter what.
after some research i thought the RouteEnhancer configuration could be the problem, so i added some configuration to the site cfg
routeEnhancers:
IndexedSearchPlugin:
type: Extbase
limitToPages:
- 41
extension: IndexedSearch
plugin: Pi2
routes:
- routePath: '/search'
_controller: 'Search::search'
defaultController: 'Search::search'
so as child of our root-page we have a page called "Suche"(route=/suche) which holds the indexed_search plugin.
so the RouteEnhancer should work like domain.at/suche -> hit search -> /suche/search results, right? it seems like everything works but the data from the search input field is just missing... so there are no results.
i cannot get this to work since quite some time now, help is much appreciated
a missing trailing slash in the form action was the problem. because without that slash a user would get redirected while loosing POST data.
solution:
.htaccess:
#redirect urls without slash
RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
site configuration:
routeEnhancers:
IndexedSearchPlugin:
type: Extbase
limitToPages:
- 41
extension: IndexedSearch
plugin: Pi2
routes:
- routePath: '/search'
_controller: 'Search::search'
defaultController: 'Search::search'
PageTypeSuffix:
type: PageType
default: '/'
index: ''
map:
'/': 0

Multidomain multilanguage sites on single typo3 v10 installation

I have read all documentation and something that seems obvious is not happening in my installation. I have several domains:
domain.net
domain.fr
domain.it
all of them are pointing the typo3 folder in server. After adding all these domains and corresponding languages in site management > sites
I still only get original frontend in .net domain rest wont show anything (blank).
Note: most information online is older versions and it seems that this point has been simplified in this version, so there is no need to include any code in .htaccess or other files. Also followed this
Looking into my folder tree I can see these folders (for each site) in mainfolder/typo3conf/sites and every of them has its config.yaml file.
Substituted real name for "domain"
this is what .net looks like (english version)
base: 'https://example.net/'
baseVariants: { }
errorHandling: { }
languages:
-
title: English
enabled: true
base: 'https://example.net/'
typo3Language: default
locale: en_US.UTF-8
iso-639-1: en
websiteTitle: ''
navigationTitle: English
hreflang: en-US
direction: ltr
flag: en-us-gb
languageId: '0'
rootPageId: 1
routes: { }
websiteTitle: ''
This is .fr (french version)
base: 'http://example.fr/'
baseVariants: { }
errorHandling: { }
languages:
-
title: French
enabled: true
languageId: '0'
base: 'http://example.fr/'
typo3Language: fr
locale: fr_FR.UTF-8
iso-639-1: fr
navigationTitle: Français
hreflang: fr-fr
direction: ltr
flag: fr
websiteTitle: ''
rootPageId: 2
routes: { }
websiteTitle: ''
Tree inside is just this
Pages have dummy content we arent developing anymore until this problem is solved.
Any idea?
Server setup should be ok as before typo3 i was able to have a wordpress multisite and it did show content. As WP isnt native multilanguage and it works with all kind of plugins that just break everything when you update. This is why we are changing to typo3. But that is another story.
Usually when everything seems fine but it doesnt work, its something silly.
.fr domains and others were handling a lower version of php so it wouldnt run typo3
So if something like this happens to you check php version on every domain!!!

Jail user to their home doesn't work

I'm using proftpd on Debian 7.
I need to jail each user in their own home directory, so they can't see and access parent folders.
Actually each user is logged in his own homedir but they can see and access parent folders.
As you can see below, I have already tried DefaultRoot ~ developers and also DefaultRoot ~ .
How can I jail each user in their own home directory, so they can't see and access parent folders?
This is my proftpd.conf
#
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes, reload proftpd after modifications, if
# it runs in daemon mode. It is not required in inetd/xinetd mode.
#
# Includes DSO modules
Include /etc/proftpd/modules.conf
# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6 on
# If set on you can experience a longer connection delay in many cases.
IdentLookups off
ServerName "Debian"
ServerType standalone
DeferWelcome off
MultilineRFC2228 on
DefaultServer on
ShowSymlinks on
TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200
DisplayLogin welcome.msg
DisplayChdir .message true
ListOptions "-l"
DenyFilter \*.*/
# Use this to jail all users in their homes
DefaultRoot ~ developers
#DocumentRoot ~
# Users require a valid shell listed in /etc/shells to login.
# Use this directive to release that constrain.
# RequireValidShell off
# Port 21 is the standard FTP port.
Port 21
# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
# PassivePorts 49152 65534
# If your host was NATted, this option is useful in order to
# allow passive tranfers to work. You have to use your public
# address and opening the passive ports used on your firewall as well.
# MasqueradeAddress 1.2.3.4
# This is useful for masquerading address with dynamic IPs:
# refresh any configured MasqueradeAddress directives every 8 hours
<IfModule mod_dynmasq.c>
# DynMasqRefresh 28800
</IfModule>
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30
# Set the user and group that the server normally runs at.
User proftpd
Group nogroup
# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022 022
# Normally, we want files to be overwriteable.
AllowOverwrite on
# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
# PersistentPasswd off
# This is required to use both PAM-based authentication and local passwords
# AuthOrder mod_auth_pam.c* mod_auth_unix.c
# Be warned: use of this directive impacts CPU average load!
# Uncomment this if you like to see progress and transfer rate with ftpwho
# in downloads. That is not needed for uploads rates.
#
# UseSendFile off
TransferLog /var/log/proftpd/xferlog
SystemLog /var/log/proftpd/proftpd.log
# Logging onto /var/log/lastlog is enabled but set to off by default
#UseLastlog on
# In order to keep log file dates consistent after chroot, use timezone info
# from /etc/localtime. If this is not set, and proftpd is configured to
# chroot (e.g. DefaultRoot or <Anonymous>), it will use the non-daylight
# savings timezone regardless of whether DST is in effect.
#SetEnv TZ :/etc/localtime
<IfModule mod_quotatab.c>
QuotaEngine off
</IfModule>
<IfModule mod_ratio.c>
Ratios off
</IfModule>
# Delay engine reduces impact of the so-called Timing Attack described in
# http://www.securityfocus.com/bid/11430/discuss
# It is on by default.
<IfModule mod_delay.c>
DelayEngine on
</IfModule>
<IfModule mod_ctrls.c>
ControlsEngine off
ControlsMaxClients 2
ControlsLog /var/log/proftpd/controls.log
ControlsInterval 5
ControlsSocket /var/run/proftpd/proftpd.sock
</IfModule>
<IfModule mod_ctrls_admin.c>
AdminControlsEngine off
</IfModule>
#
# Alternative authentication frameworks
#
#Include /etc/proftpd/ldap.conf
#Include /etc/proftpd/sql.conf
#
# This is used for FTPS connections
#
#Include /etc/proftpd/tls.conf
#
# Useful to keep VirtualHost/VirtualRoot directives separated
#
#Include /etc/proftpd/virtuals.conf
# A basic anonymous configuration, no upload directories.
# <Anonymous ~ftp>
# User ftp
# Group nogroup
# # We want clients to be able to login with "anonymous" as well as "ftp"
# UserAlias anonymous ftp
# # Cosmetic changes, all files belongs to ftp user
# DirFakeUser on ftp
# DirFakeGroup on ftp
#
# RequireValidShell off
#
# # Limit the maximum number of anonymous logins
# MaxClients 10
#
# # We want 'welcome.msg' displayed at login, and '.message' displayed
# # in each newly chdired directory.
# DisplayLogin welcome.msg
# DisplayChdir .message
#
# # Limit WRITE everywhere in the anonymous chroot
# <Directory *>
# <Limit WRITE>
# DenyAll
# </Limit>
# </Directory>
#
# # Uncomment this if you're brave.
# # <Directory incoming>
# # # Umask 022 is a good standard umask to prevent new files and dirs
# # # (second parm) from being group and world writable.
# # Umask 022 022
# # <Limit READ WRITE>
# # DenyAll
# # </Limit>
# # <Limit STOR>
# # AllowAll
# # </Limit>
# # </Directory>
#
# </Anonymous>
# Include other custom configuration files
Include /etc/proftpd/conf.d/
<Global>
AccessGrantMsg "Benvenuto sul server demo Up3Up! Ricordati di fare sempre un backup di cio' che modifichi!"
AccessDenyMsg "Accessi al server FTP demo di Up3Up errati!"
</Global>
This is how I create users and set their own homedir
#!/bin/bash
echo "Procedura per la creazione di un utente FTP . . ."
#Chiedo il nome dell'account
read -p "Inserisci il nome (senza #up3up.net): " user
#Chiedo il percorso
echo "Percorso per $user # up3up.net (senza /var/www/up3upn/public_html/)"
read -p "Inserisci il percorso: " percorso
#Se non esiste il percorso lo creo
mkdir /var/www/up3upn/public_html/"$percorso" &> /dev/null
#Avverto che verra' chiesta la password
echo "Inserisci la password in chiaro per $user # up3up.net"
#Creo l'account' e chiedo la password
useradd -d /var/www/up3upn/public_html/"$percorso" "$user" &> /dev/null
usermod -m -d /var/www/up3upn/public_html/"$percorso" "$user" &> /dev/null
useradd -G developers "$user" &> /dev/null
passwd "$user"
echo "Account creato $user # up3up.net con percorso /var/www/up3upn/public_html/$percorso"
#Riavvio il servizio FTP
service proftpd restart &> /dev/null
you have to create a Group (like ftpjail) ald add all users that should be jailed to this group.
Then add the line to your proftpd.conf (must not be at end of file):
DefaultRoot ~ ftpjail # this must be a group!
now restart your FTP-Server and now the users are chrooted and jailed!
I had the same problem.. I found out that the DefaultRoot ~ developers line needs to be at the end of the config file..