Thanks, Tim. I did try using the IP address everywhere, and that didn't
work. But, as you point out, that would be because I wasn't using HTTPS.

As you also point out, it's right there in the instructions: 'Running the
DSpace Backend on HTTP & port 8080 is only usable for local development
environments (where you are running the UI and REST API from the same
machine, and only accessing them via localhost URLs).'

I must have read that a hundred times without taking it in.

I'll try again with the IP addresses and HTTPS.

Sean

On Wed, 18 Aug 2021 at 17:01, Tim Donohue <[email protected]> wrote:

> Hi Sean,
>
> It looks like your environment.prod.ts is using a "localhost" based URL
> for the REST API.  This means it will attempt to access your REST API on
> the *same machine *where you are running your web browser.
>
> In other words, a localhost URL for the REST API is only valid if you are
> in a development environment...where both the UI and REST API are running
> on your local machine & you are only accessing both via localhost URLs from
> that same machine.
>
> Since it sounds like you are accessing your REST API via a public IP
> address (10.4.36.43), you should be using that same public URL/IP address
> in your "rest" settings for environment.prod.ts.  Keep in mind, your REST
> API also MUST be running HTTPS if you plan to run it on a non-localhost
> URL.
>
> See the various "Common Installation Issues" here:
> https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-CommonInstallationIssues
>
> Also, see step 16 of the Backend Installation instructions:
> https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-BackendInstallation
>
> Good luck!
> Tim
>
>
> ------------------------------
> *From:* [email protected] <[email protected]> on
> behalf of Sean Carte <[email protected]>
> *Sent:* Tuesday, August 17, 2021 8:21 AM
> *To:* DSpace Technical Support <[email protected]>
> *Subject:* [dspace-tech] DSpace 7: 'Invalid email or password'
>
> After installing DSpace 7, I created an administrator account, but am
> unable to log in using those credentials; I get the error: 'invalid email
> or password'.
>
> I am able to use those credentials to log into the HAL Browser, however.
>
> I'm using a VM on a remote server with the following URLs:
>
> http://10.4.36.43:8080/server/
> http://10.4.36.43
>
> I have Nginx configured to proxy port 4000.
>
> I checked the Network tab of Firefox's Dev Tools, and saw CORS Failed
> errors, and the DSpace installation documentation,
>
>    - By default, the DSpace REST API / Backend will only trust the
>    application at dspace.ui.url.  Therefore, you should first verify that
>    your dspace.ui.url setting (in your local.cfg) exactly matches the
>    *primary* *URL* of your User Interface (i.e. the URL you see in the
>    browser).  This must be an exact match: mode (http vs https), domain, port,
>    and subpath(s) all must match.
>    - If you need to trust *additional* client applications / URLs, those
>    MUST be added to the rest.cors.allowed-origins configuration. See REST
>    API <https://wiki.lyrasis.org/display/DSDOC7x/REST+API> for details on
>    this configuration.
>
> So I added these to the foot of my local.cfg and restarted tomcat:
>
> rest.cors.allow-origins = ${dspace.ui.url}
> rest.cors.allow-origins = http://localhost
> rest.cors.allow-origins = http://10.4.36.43:4000
> rest.cors.allow-origins = http://10.4.36.43
> rest.cors.allow-origins = http://localhost:8080
> rest.cors.allow-origins = localhost:8080
>
> But that doesn't seem to have helped:
>
> [image: Selection_021.png]
> These are my configurations:
>
> src/environments/environment.prod.ts:
> export const environment = {
>   ui: {
>       ssl: false,
>       host: 'localhost',
>       port: 4000,
>       nameSpace: '/'
>   },
>   rest: {
>       ssl: false,
>       host: 'localhost',
>       port: 8080,
>       nameSpace: '/server'
>   }
> };
>
> /dspace/config/local.cfg:
> dspace.dir=/dspace
> dspace.server.url = http://localhost:8080/server
> dspace.ui.url = http://localhost:4000
>
> /etc/nginx/sites-enabled/default:
>         location / {
>                 proxy_pass      http://localhost:4000;
>                 proxy_http_version 1.1;
>                 proxy_set_header Upgrade $http_upgrade;
>                 proxy_set_header Connection ‘upgrade’;
>                 proxy_set_header Host $host;
>                 proxy_cache_bypass $http_upgrade;
>                 proxy_set_header X-Real-IP $remote_addr;
>                 proxy_set_header HOST $http_host;
>                 proxy_set_header X-NginX-Proxy true;
>                 proxy_set_header X-Forwarded-Proto $scheme;
>         }
>
> Any ideas where I've gone wrong?
>
> Sean
>
> --
> All messages to this mailing list should adhere to the Code of Conduct:
> https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
> ---
> You received this message because you are subscribed to the Google Groups
> "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dspace-tech/CA%2BxAuhP%3DypdwoXdD%3DVjxJT%3D%3DF3abRkDPMUdPkr2q9DSQ2hGX%3Dg%40mail.gmail.com
> <https://groups.google.com/d/msgid/dspace-tech/CA%2BxAuhP%3DypdwoXdD%3DVjxJT%3D%3DF3abRkDPMUdPkr2q9DSQ2hGX%3Dg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/CA%2BxAuhNW4nFavTUJ4kevgkoo3exFk%2B2NNVDhTZX8BrVVCPa4Ew%40mail.gmail.com.

Reply via email to