I'm trying to make my first website with API Platform (I'm already fine with Next.js and Symfony, so the environment is familiar to me !) using the API Platform docker installation.
I'm working on Windows 11, with Ubuntu on WSL2 and Docker for Windows. All containers have no problem to launch, and throw no errors. The problem is it's impossible to access to the PWA website (localhost/, and localhost/admin), but /docs seems to work (without trusting certificate). Here is some Caddy error logs
caddy_1 | {"level":"error","ts":1637357776.747518,"logger":"http.log.access","msg":"handled request","request":{"remote_addr":"172.25.0.1:45048","proto":"HTTP/2.0","method":"GET","host":"localhost","uri":"/.well-known/mercure","headers":{"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36"],"Caddy-Push":["1"],"Accept-Encoding":["gzip, deflate, br"],"Accept-Language":["fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6,zh;q=0.5"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","proto_mutual":true,"server_name":"localhost"}},"common_log":"172.25.0.1 - - [19/Nov/2021:21:36:16 +0000] \"GET /.well-known/mercure HTTP/2.0\" 400 27","user_id":"","duration":0.0001409,"size":27,"status":400,"resp_headers":{"X-Xss-Protection":["1; mode=block"],"Content-Security-Policy":["default-src 'self' mercure.rocks cdn.jsdelivr.net"],"Content-Type":["text/plain; charset=utf-8"],"Server":["Caddy"],"Alt-Svc":["h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000"],"X-Frame-Options":["DENY"],"X-Content-Type-Options":["nosniff"]}}
If it was only a trust certificate issue, it will be ok, but I can't work on my website without access to my PWA ! I'm not comfortable with Caddy, so if someone have any workaround, I'll be glad to try it.
EDIT: I tried to create a fresh install outside WSL2 (in my windows system), and it seems to work better. Certificate still not trusted but at least I can load my PWA ! So it seems to be caused by WSL2 ?
Related
I have a particularly annoying Mac user who is spamming me. This is the user-agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20100101
Firefox/9.0"
Would you suggest to block it via htaccess? Is the following sufficient or is Gecko/20100101 a common user agent?
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} Gecko/20100101 [NC]
RewriteRule ^ - [F,L]
No, that's really not a good way to do it. First, you're blocking everyone who uses that version of firefox on a Mac running OSX 10.6. Second, you aren't blocking him when he switches to another browser to continue trolling you. Just block the ip address, or issue a cookie that returns a token when a user revisits the site, and automatically adds them to the blacklist if the token belongs to an offender. You can also block users who refuse the cookies if the problem is incredibly pervasive to ensure he can't just turn cookies off to circumvent this. There are of course ways around this for a persistent or knowledgeable pest, however in 99.9% of cases this will get rid of them.
The UA string of Firefox itself is broken down into four components:
Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion
Mozilla/5.0 is the general token that says the browser is Mozilla compatible, and is common to almost every browser today.
platform describes the native platform the browser is running on (e.g. Windows, Mac, Linux or Android), and whether or not it's a mobile phone. Firefox OS phones simply say "Mobile"; the web is the platform. Note that platform can consist of multiple "; "-separated tokens. See below for further details and examples.
rv:geckoversion indicates the release version of Gecko (such as "17.0"). In recent browsers, geckoversion is the same as firefoxversion.
Gecko/geckotrail indicates that the browser is based on Gecko.
On Desktop, geckotrail is the fixed string "20100101"
Firefox/firefoxversion indicates the browser is Firefox, and provides the version (such as "17.0").
from Firefox 10 on mobile, geckotrail is the same as firefoxversion
ERROR
"You were disconnected from the Windows-based computer because of problems during the licensing protocol"
I have scoured the Internet and have read it can be fixed...but no one has given me a working fix. I have tried many fixes but still no luck =(.
Anyone know a FUNCTIONING fix for 10.7 and or 10.8
I am using http://www.microsoft.com/mac/remote-desktop-client (the latest version) to connect to Windows Server 2008 R2 Standard. Running RDS with a 5 User CAL. No Active Directory just basic accounts as the local IT team hasn't a clue how to use AD and I am a thousand miles away.
Did you try Thinomenon RDC for Mac? It properly supports redirect token, which could be the problem.
I found these 2 links which seems to have fixed the issue (Hope it's not the same you tried !!!), esp follow vezard & Martijn Huizer's response:
http://social.technet.microsoft.com/Forums/en-US/winserverTS/thread/8e28b0af-b374-4ca0-a255-5fd854bdc7fa
http://support.microsoft.com/kb/2477133
Hope it solves your issue !
Microsoft has released a new RDP client in the app store. So far It seems to work.
I try to be careful where I download from, and I found this Remote Desktop client option on sourceforge.net - a download site I am familiar with and trust:
http://cord.sourceforge.net
From their site:
CoRD is a Mac OS X remote desktop client for Microsoft Windows computers using the RDP protocol. It's easy to use, fast, and free for anyone to use or modify.
I am using Max OS X 10.7
I'm building a web app on my Mac and have so far been testing with XAMPP. I'm looking at finding a virtual server vendor to host my application but have found almost none that is compatible with Mac, Apache, PHP and MySql. I don't want to go the Mac Mini route for now.
Does anyone have any suggestions on how I could do this or what vendor to use?
If it's a PHP/mySQL app, chances are it's not very dependent on the OS it's running on. Unless you have something totally Mac specific running in your app, getting a normal Linux VPS may be the way to go.
Environment:
Main platform: MAC OSX 10.6
Secondary platform via VMWare Fusion: Windows 7 64-bit
Background: I'm running MAMP Pro on the MAC side with a webroot at "/www". I need to test websites in IE thus requiring a Windows installation. I installed XAMPP on my Windows side and changed the apache root directory to "Z:\www", the location of my MAMP webroot which is a shared folder between MAC and Windows.
When I try to access a local site from windows (http://localhost/asite) I get a 403 Forbidden error:
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
07/30/10 14:21:07
Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1
What other configuration changes need to be made for this to work if it will work at all?
Thanks,
Chris
Thanks to those who responded. I did a little research on the types of network connections and here's how I resolved the issue without using XAMPP at all.
To recap, I'm running Win7 on my Mac via VMWare Fusion as a virtual machine. I have MAMP running a local web server on my Mac with a webroot at /www and I want to be able to also access the web server from browsers in Windows.
In short, I want to be able to go to http://localhost/mysite from Safari (Mac) or IE (Windows).
Changed my Fusion Network Adapter to Bridged, since I am working from a home office.
Refreshed my network connections using the ipconfig commands in the command prompt.
Edited my windows hosts file to reflect: 192.168.1.102 localhost
Done and done.
I hope someone else can find this useful.
Chris
Is there any specific reason you're trying to serve your site from XAMPP, rather than just MAMP? I worked in a similar environment a couple of years ago, and I simply set the virtual machine's networking type to NAT (so that the guest has a different IP from the host), and then pointed IE at the IP address of the host running MAMP.
Maybe I didn't quite understand your problem completely, but:
"I need to test websites in IE"
you don't need to setup a Web server to do that...
Keep using Apache on your Mac host and point IE from your Windows VM to the host machine IP, as peterjmag suggested.
Also, wasn't there a Mac version of IE?
Again, my apologies if i misunderstood you - I don't want to sound arrogant;)
"Z:\www ... a shared folder between MAC and Windows"
What's this - a network share? Do you get the same error if you use a local folder in your VM (eg: C:\www)?
Try mounting /www from your VM - go to it's settings > options tab > shared folders. Select Always Enabled. Click Add and browse to your /www host folder. This should make /www accessible in your VM Windows.
Finally, just in case: check Windows permissions on the www folder.
Hope that helps!
Is there a ZeroConf client extension for Firefox/XULRunner to be used in a zeroConf environment based on either mDNS or SLP?
I know of an extension already that's being developed by the ActiveState Open Komodo folks but it requires PyXPCOM support to be baked into the XULRunner runtime in order to access the Apple Bonjour libs for Windows. Is there anything else available?
It appears that Andrew Tunnell-Jones has undertaken the task.
http://andrew.tj.id.au/projects/bonjourfoxy/
I have not yet verified that it works for me under Windows, but I am hopeful :)
It did not discover that I activated web sharing here, only with a user account active. Let me know what you find.
BonjourFoxy has come some way since Thorbjørn Ravn Andersen's post. It's implemented as a set of binary XPCOM modules tied together with a JavaScript XPCOM service. The service can be used to register, browse and resolve services as well as to enumerate browse and registrations domains. It builds and runs on OS X 10.5 (Intel), Ubuntu 8.10 (32-bit) and Windows XP (32-bit) and has been run on Windows 2000 as well.
The links given in this answer are dead or misleading.
It seems like the project has changed its name and can now be found at
http://dnssd.me/ .
I can confirm it works on
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0 on Win7.
I would have commented the posts, but don't have enough reputation to do so.