Why do I get Err 403 (Forbidden) when I use Chrome/FF with https but when I connect via CarotDAV it works fine - ubuntu-18.04

Can anyone here explain the problem, Why do I get Error 403 (Forbidden) but when I connect to a https WEBDAV I can get the Directory Listing. I use WebDAV Server on Ubuntu 18.4 with valid Certificate and port 4433.
When I use CarotDAV I can see all files in the directory and works fine. But with Chrome or FF or when I use the IPWorks WebDAv compononet (separate question: Q&A for WebDAV Comp from nsoftware ) in Delphi 10.4 I get Error 403 from Server. Is there a option to set in the https.conf in apache to see the directory listing also in Chrome/FF ?
Thanks

As I could see: with this options it works fine also with Chrome/FF
Alias /icons/ "/var/www/icons/"
<Directory "/var/www/icons">
Options Indexes MultiViews
AllowOverride None
Require all granted
</Directory>

Related

CakePhp, Xampp & SSL "Internal error has occured"

Im trying to set up an SSL connection on my localhost XAMPP. Ive done this before, and had it working, but this time around I have trouble with the SSL connection I guess, cause I doubt its about the code since it was something that worked on before. And there have not been any changes since then. Im using virtual hosts with SSL on only one page. When I try and connect to it, it shows me an error on cakephp, but gives me no information about what the error is. Here is a Screnshot:
Also On my Xampp I have the next configuration for it to work with SSL:
NameVirtualHost *:443
<VirtualHost *:443>
DocumentRoot "C:\xampp\htdocs\Bebe2go api"
ServerName bebe2goapi.com
SSLEngine on
SSLCertificateFile "C:\xampp\apache\conf\ssl.crt\server.crt"
SSLCertificateKeyFile "C:\xampp\apache\conf\ssl.key\server.key"
<Directory "C:\xampp\htdocs\Bebe2go api">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Im using a Shopify login plugin for the login and calls to Shopify. Right now its not working, but Im not sure why this is happeing. I dont think the error is on the code, but Ive tried quite a few options with no luck at all. Any ideas where I could start to look for a solution for this?
A quick side note here: The favicon from the page is being replaced by the Xampp favicon. Instead of the normal Cakephp icon which should show. Im not sure if this has anything to do with the trouble im haveing. But its worth noting.
If you need any more information please do ask :D
EDIT:
Acutally I just noticed, I get the next error on the cakephp errorlog:
2016-04-13 00:25:16 Error: [CurlException] SSL certificate problem: unable to get local issuer certificate
Request URL: /shopify/install?code=a547ef8d8ceb1470f89a23bd4318fa4d&hmac=c95ccf2fc00221b4e1f15acb645ab7009bcf99ba0bf2eb399c3e105184bdeaad&shop=bebe2go.myshopify.com&signature=f1df3f9788935385932ff577961dcf70&timestamp=1460499916
Ok I just solved my problem, hehehe Apparently I was not pointing to the curl.cainfo from the php.ini wasnt pointing to the right direcction. This made the problem harder to solve cause the error didnt include a description for this error. All I had to do was put the right URL on the curl.cainfo in the php.ini from my xampp program and presto.
The rest was done right.

failed to process http post,get,put and delete request from cc3200 launchpad to local server or http server

//I am using
define GET_REQUEST_URI "GET /ms/v_updated.php?id=9,9,9& qty=9,9,9/HTTP/1.1\r\nHost:127.0.0.1\r\nAccept: /\r\n\r\n"
for v_updated.php file on my localserver using my cc3200 launchpad
//and i wanted to know that is this the correct syntax am i using for GET request in cc3200
![on console i got following outpt]
[1] STA connected to AP:
[2]IP Acquired :
[3]Connection to server created successfully
HTTP Get Begin:
Failed to send HTTP GET request
HTTP Post Get failed
HTTP gET End:
and i also want to know about the json parser being used..
It is possible that your local server is declining requests from CC3200. Try Configuring the local Server.
If you are using XAMPP, Go to Config > httpd.conf, open it.
Search AllowOverride. You will find the following settings (or Similar ),
<Directory />
AllowOverride None
Options None
Order allow,deny
Allow from None
</Directory>
Change None to All.
It Should look like
`<Directory />
AllowOverride All
Options All
Order allow,deny
Allow from All
</Directory>`

Apache localhost authentication

I am trying to setup up basic authentication to a folder on my localhost running apache. Currently the app runs fine without authentication. I have setup a virtual host so I can access my application through dev.myapp.com
The code I add to my .htaccess file to force authentication is:
<Directory "/Users/myusername/Sites/dev.myapp.com">
AuthType Basic
AuthName Test
AuthBasicProvider file
AuthUserFile /etc/apache_users
Require valid-user
</Directory>
I have created a user.
When I type dev.myapp.com into the browser I get an internal server error. I am fairly new to apache. A point in the right direction would be appreciated.
Thanks.
First off, using .htaccess is a bit slower and requires that you have set the AllowOverride directive accordingly. It is recommended that you instead use httpd.conf to establish basic authentication. The Apache documentation explains all of this so check out this link http://httpd.apache.org/docs/2.2/howto/auth.html.
Regardless, I think I see the error. Your <Directory> tag looks a little odd. I understand the name of your site is dev.my.app.com but is that the actual name of the folder where the site dev.myapp.com points to on your server? Your httpd.conf file should have an entry like this:
<VirtualHost *>
DocumentRoot "document/root/path"
Other directives here
</VirtualHost>
The DocumentRoot is where Apache directs all incoming web traffic. If you are trying to establish authentication for your entire site, the value of DocumentRoot is most likely what you would want in your Directory tag ... making it <Directory /document/root/path>.
To locate httpd.conf look in in /etc/apache2/. Make sure to restart your server after you change the file (sudo /etc/init.d/apache2 restart). Hope that helps, please update if you haven't already resolved the problem.

Can't access files in a subdirectory using Apache server

I have an Apache 2.2.21 server installed on my Windows 7 machine.
My site is up and my scripts from /scripts subdirectory are working but when I try to load icons from /icons I get a 403 forbidden error.
I've already added this to my httpd.conf file:
<Directory "c:/wamp/www/icons/">
Options Indexes FollowSymLinks
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
Still no effect. So the question is: how can I access files in my /icons subfolder?
P.S.: Using /images subdirectory worked out just fine but the question still remains.
I figured out that /icons/ was included as an alias for some other directory. For me, configuration file was located at:
C:\wamp\bin\apache\apache2.2.21\conf\extra\httpd-autoindex.conf
I had to comment out this line:
Alias /icons/ "c:/Apache22/icons/"
Have you checked the Windows permissions on the /icons directory, and made sure that the Apache user can read that directory? Is there possibly an .htaccess file in the picture?
Edit: Okay, so it's not permissions. My next guess is this: your config above says "everyone is forbidden access except when they're coming from 127.0.0.1". But you're on Windows 7. Windows 7 tries to be helpful and modern - and often tries accessing via IPv6 first. So you might show up as coming from ::1, which is probably failing to match 127.0.0.1. Try turning off IPv6 or adding an Allow from ::1 directive.
Ok so if your httpd.conf doesn't do anyhting you should restart apache. Any changes done to documents have to be restarted so Apache can "Refresh".
<Directory "c:/wamp/www/icons/">
Options Indexes FollowSymLinks
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
So above this is your code. It basically says in line 4 that Apache should deny connection from all incoming connections connections to the /icons/folder.
Also on line 5 it says to allow incoming connections from only 127.0.0.1 or localhost. So basically the server has access to it!
If changing it doesn't work you should look in .htaccess. Another option is just to copy the Code from a folder that works and paste it and just change the paste from EX:
"C:/WAMP/www/images/" to "C:/WAMP/www/icons".

ProxyPassMatch directive problems

We have an environment with Apache 2.2.11 acting as front end to incoming connections to a Tomcat backend server. We are using the following directives in the http-ssl.conf, which works great when not trying to catch 403 errors:
SetEnvIf COMPANY EDLP 4.0.1 NLEDLPKEY=true
General setup for the virtual host
DocumentRoot "C:/xampp/htdocs/"
ServerName localhost:443
ServerAdmin admin#localhost
ProxyRequests Off
ProxyPassMatch / htp://tomcat.company.com**<-- been having issues with this directive (using only one "t" in http to bypass this sites new user can only post one URL per question limitation**
ProxyPassReverse / htp://tomcat.company.com
As you can see we are using the mod_access (now called mod_authz_host in Apache 2.2) module to pass a variable called NLEDLPKEY so that only (Internet Explorer) clients with this variable could access Tomcat via SSL. Also, I am trying to not only reverse proxy SSL connections, but also to redirect the 403 errors (for people without the variable) to a specified page (error_page.html). I have tried:
ProxyPassMatch "^[^(/error_page.html)]" htp://tomcat.company.com and also tried
ProxyPassMatch “^(?!/error_page.html)” htp://tomcat.company.com
to see if it is possible to redirect to the error page and not get the below message:
Forbidden
You don't have permission to access /RDS on this server. <--RDS is just a directory-->
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9 Server at apache-company Port 443
Any help would be appreciated
R.
I ran into this issue recently - it took a bit of hunting but here's how I fixed it:
In /etc/apache2/mods-available/proxy.conf (Ubuntu - YMMV) change it to look like the following:
<Proxy *>
AddDefaultCharset off
Order deny,allow
Deny from all
Allow from all
</Proxy>
It's also important to note that for reverse proxies, it is not necessary to have ProxyRequests On configured and doing so in conjunction with Allow from all is hazardous. (Can be used by spammers to send mail via your proxy.)

Resources