Can’t instal stolon/monaco #27

Closed
opened 2024-08-20 10:25:13 +00:00 by raphaelbastide · 8 comments
raphaelbastide commented 2024-08-20 10:25:13 +00:00 (Migrated from gitlab.com)

I can’t get monaco branch work: the redirection to a new stem nem is done in the URL bar, but a 404 is displayed. This is from a fresh stolon copy, on the monaco branch. I have no idea what happens.

I can’t get monaco branch work: the redirection to a new stem nem is done in the URL bar, but a 404 is displayed. This is from a fresh stolon copy, on the monaco branch. I have no idea what happens.
julienbidoret commented 2024-10-02 10:30:34 +00:00 (Migrated from gitlab.com)

Hmm. Multiple thinks seem to go wrong on a fresh install…
Need to dig further.
Which PHP version were you running?

Hmm. Multiple thinks seem to go wrong on a fresh install… Need to dig further. Which PHP version were you running?
raphaelbastide commented 2024-10-02 10:47:23 +00:00 (Migrated from gitlab.com)

I am running 8.3.6

I am running 8.3.6
julienbidoret commented 2024-10-02 10:49:03 +00:00 (Migrated from gitlab.com)

Should be way enough. The problem(s) is(are) elsewhere.

Should be way enough. The problem(s) is(are) elsewhere.
raphaelbastide commented 2024-10-02 11:02:38 +00:00 (Migrated from gitlab.com)

I am doing more tests and get back to you.

I am doing more tests and get back to you.
raphaelbastide commented 2024-10-02 11:53:41 +00:00 (Migrated from gitlab.com)

I starts being more clear: HTTPS lines in .htaccess seam to cause a first issue:
This line does not avoid redirecting on my dev URL. As I dev on http://dev.stolon, I had to add this line: RewriteCond %{HTTP_HOST} !=dev.stolon
This doesn’t solve the issue on localhost, even if I start a server with php -S localhost:3000, I always get a 404.
But what ~works, is on my dev.stolon, a white, empty HTML page is displayed without error. That is where I am!

I starts being more clear: HTTPS lines in .htaccess seam to cause a first issue: [This](https://gitlab.com/raphaelbastide/stolon/-/blob/monaco/.htaccess?ref_type=heads#L7) line does not avoid redirecting on my dev URL. As I dev on http://dev.stolon, I had to add this line: `RewriteCond %{HTTP_HOST} !=dev.stolon` This doesn’t solve the issue on localhost, even if I start a server with `php -S localhost:3000`, I always get a 404. But what ~works, is on my `dev.stolon`, a white, empty HTML page is displayed without error. That is where I am!
julienbidoret commented 2024-10-02 13:52:09 +00:00 (Migrated from gitlab.com)

mentioned in issue #30

mentioned in issue #30
julienbidoret commented 2024-10-02 13:55:40 +00:00 (Migrated from gitlab.com)

Yep. As .htaccess and redirects are involved at multiple levels (and part of the magic!), thinks can go wrong at some points.

As I mentionned in #30, RewriteBase might be another issue…

Yep. As .htaccess and redirects are involved at multiple levels (and part of the magic!), thinks can go wrong at some points. As I mentionned in #30, RewriteBase might be another issue…
raphaelbastide commented 2024-10-02 15:20:27 +00:00 (Migrated from gitlab.com)

RewriteBase was the thing from the begining! So to make it work, I have in .htaccess:

# HTTPS by default
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !=localhost
RewriteCond %{HTTP_HOST} !=dev.stolon
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

# RewriteBase is Stolon is in subdir
RewriteBase /
RewriteBase was the thing from the begining! So to make it work, I have in .htaccess: ``` # HTTPS by default RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} !=localhost RewriteCond %{HTTP_HOST} !=dev.stolon RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] # RewriteBase is Stolon is in subdir RewriteBase / ```
raphaelbastide (Migrated from gitlab.com) closed this issue 2024-10-02 15:20:27 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tarball/stolon#27
No description provided.