Error on redirect URL when using Oauth2 "No input file specified. "
Hi,
I think i got the same error. 404 see in the log.
Can i copy/paste the result somewhere in the DB? or put the configuration from hand some where?
Thanks for the help.
I got a better reply from our provider. They cannot enable AllowOverrides All on our server for security reason.
@KevinTheJedi Can you tell me which detailed functions osTicket needs?
At the moment this is configured:
Options -ExecCGI -FollowSymlinks -Includes +IncludesNoExec -Indexes -Multiviews +SymLinksIfOwnerMatch
AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
KevinTheJedi Thanks for the idea. I contacted my host and have confirmed that URL rewriting is on for this domain and sub domain. I have also confirmed that AllowOverride All is set. The only thing so far that I can think of is that my redirect URL is incorrect. It is currently set to the default which was entered during setup (see screenshot). Can you confirm if this is correct or not? Thanks.
as an aside, when browsing the files, this directory doesn't exist in this state which I'm assuming the re-direct is all about. Where should it be in order that I can confirm that it actually exists. Thanks again. Sam
I don’t know what you mean. Please further explain on what you are asking.
It appears correct. The path doesn’t physically exist which is why you need URL Rewriting enabled. It will hit api/ folder and use the api/.htaccess file to rewrite the URL appropriately. Maybe your host doesn’t allow .htaccess files to be loaded?
Cheers.
KevinTheJedi Sorry to be a pain, however, i think I'm (you're) getting closer. My .htaccess file consists of the following. Is there anything else that should be in it? This is in the api folder.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.*/api)
RewriteRule .*$ %1/http.php/$1 [L]
</IfModule>
KevinTheJedi So I do not have a separate Apache config. Just one config for the vhost. I have a WordPress site at the root with Osticket in the sub directory.
Then maybe try adding one specifically for the subfolder with AllowOverride All, restart Apache, and retest.
Cheers.
KevinTheJedi Thanks for all your help. I asked my host and they spotted that the issue seems to come from the .htaccess rules in the /api folder. The following one:
RewriteRule .*$ %1/http.php/$1 [L]
Should only be:
RewriteRule .*$ %1/http.php/ [L]
This resolved my issue, however, I still have issues with emails not fetching or sending but thats for another thread ! thanks for all your help.
I use Apache and did not need to make any changes other than enabling URL Rewriting. Maybe your host has some weird routing issues or something?
Cheers.
With the solution of @sedwardson I got redirected to the root site of my osTicket instance but the OAuth has no Token. So not really a solution I guess.
@"KevinTheJedi My provider ask which rewriting options are needed since they cannot set "All"
The ones in all the .htaccess files in the codebase. There are a few so they can run a find command to see all the .htaccess files.
Cheers.
KevinTheJedi I agree, I'm just happy that I have the token and that part seems to work :-)
Thanks again.
- Edited
cross-it Not sure if it will help but one of the things I did was put the http.php in the re-directed URL. I'm not sure which actually resolved the issue but maybe it will help?
https://domain.name/api/http.php/auth/oauth2?code=0.AV4ALQR-FOlNX0Cj_...
Sam
sedwardson
That was a good hint.... Thanks...
Yea if URL Rewriting isn't working you can hardcode http.php but you should really get URL Rewriting working as other parts of the helpdesk will need it too.
Cheers.
HI,
Go the same problem. "No input file specified"
Using a plesk basic installation on debian