Parse sever configured for HTTPS not working with HTTPS

Keywords: Parse - AWS - How to - Secure Connections (SSL/HTTPS)
Description:
So i have just created a Parse server through Bitnami onto AWS server.

I went ahead to configure the server to run on HTTPS due to the site not opening at all with https. I can only enter the Parse Dashboard through the ip address and not using HTTPS.

I tried configuring the server using this video: https://www.youtube.com/watch?v=amiuttv8BEw
and using this document guide: https://docs.bitnami.com/bch/apps/parse/administration/forcehttps/

But it still is not doing anything. and when i try to connect to the dashboard through the public domain name. i get a blank screen when i log in using HTTPS and i cannot use just HTTP to enter using the domain name.

The only way i am able to connect to my dashboard is through the servers ip address and using only HTTP.

Hi @Sami117

Thanks for using Bitnami Parse!

We have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?

Please note that you need to paste the code ID that is shown at the end.

Dear @jcarmona

Here is the support code ID: 5292dc14-5925-e673-2419-f536f9c8d869

And also i tried running this command: sudo /opt/bitnami/ctlscript.sh restart

But running the script produces this error:
“Job for bitnami.service failed because the control process exited with error code.
See “systemctl status bitnami.service” and “journalctl -xe” for details.”

Hi @Sami117

Could you please execute those two commands ?

$ systemctl status bitnami.service
$ journalctl -xe

Additionally, could you please execute the following ones?

$ sudo apachectl -t
$ cat /opt/bitnami/apache/logs/error_log | tail -n40

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

This is the results of the first commands.

bitnami@ip-172-31-37-126:~$ systemctl status bitnami.service
● bitnami.service - LSB: bitnami init script
   Loaded: loaded (/etc/init.d/bitnami; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2021-01-20 16:12:27 UTC; 20h ago
  Process: 6436 ExecStart=/etc/init.d/bitnami start (code=exited, status=1/FAILURE)
    Tasks: 7 (limit: 1164)
   Memory: 124.5M
   CGroup: /system.slice/bitnami.service
           └─1265 /opt/bitnami/gonit/bin/gonit

Jan 20 16:12:27 ip-172-31-37-126 bitnami[6436]: nami    ERROR Unable to start com.bitnami.apache: AH00526: Syntax error on line 2 of /opt/bitnami/apache/conf/vhosts/parse-https-vhost.conf:
Jan 20 16:12:27 ip-172-31-37-126 bitnami[6436]: Invalid ServerName "*" use ServerAlias to set multiple server names.
Jan 20 16:12:27 ip-172-31-37-126 bitnami[6436]: ## 2021-01-20 16:12:27+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/010_bitnami_agent_extra...
Jan 20 16:12:27 ip-172-31-37-126 bitnami[6436]: ## 2021-01-20 16:12:27+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/020_bitnami_agent...
Jan 20 16:12:27 ip-172-31-37-126 bitnami[6436]: ## 2021-01-20 16:12:27+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/030_update_welcome_file...
Jan 20 16:12:27 ip-172-31-37-126 bitnami[6436]: ## 2021-01-20 16:12:27+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/040_bitnami_credentials_file...
Jan 20 16:12:27 ip-172-31-37-126 bitnami[6436]: ## 2021-01-20 16:12:27+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/050_clean_metadata...
Jan 20 16:12:27 ip-172-31-37-126 systemd[1]: bitnami.service: Control process exited, code=exited, status=1/FAILURE
Jan 20 16:12:27 ip-172-31-37-126 systemd[1]: bitnami.service: Failed with result 'exit-code'.
Jan 20 16:12:27 ip-172-31-37-126 systemd[1]: Failed to start LSB: bitnami init script.
bitnami@ip-172-31-37-126:~$ journalctl -xe
-- Support: https://www.debian.org/support
--
-- A start job for unit session-615.scope has finished successfully.
--
-- The job identifier is 5079.
Jan 21 12:11:46 ip-172-31-37-126 systemd[11045]: Reached target Default.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit UNIT has finished successfully.
--
-- The job identifier is 1.
Jan 21 12:11:46 ip-172-31-37-126 systemd[11045]: Startup finished in 20ms.
-- Subject: User manager start-up is now complete
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The user manager instance for user 1000 has been started. All services queued
-- for starting have been started. Note that other services might still be starting
-- up or be started at any later time.
--
-- Startup of the manager took 20664 microseconds.
Jan 21 12:11:46 ip-172-31-37-126 sshd[11060]: Accepted publickey for bitnami from 51.141.5.180 port 33938 ssh2: RSA SHA256:ymz1QT/z//7OywIQvzLpOi5BwZtILt5H8s10bITD04A
Jan 21 12:11:46 ip-172-31-37-126 sshd[11060]: pam_unix(sshd:session): session opened for user bitnami by (uid=0)
Jan 21 12:11:46 ip-172-31-37-126 systemd-logind[518]: New session 617 of user bitnami.
-- Subject: A new session 617 has been created for user bitnami
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID 617 has been created for the user bitnami.
--
-- The leading process of the session is 11060.
Jan 21 12:11:46 ip-172-31-37-126 systemd[1]: Started Session 617 of user bitnami.
-- Subject: A start job for unit session-617.scope has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit session-617.scope has finished successfully.
--
-- The job identifier is 5135.
Jan 21 12:11:47 ip-172-31-37-126 sshd[11073]: Accepted publickey for bitnami from 51.141.5.180 port 33944 ssh2: RSA SHA256:ymz1QT/z//7OywIQvzLpOi5BwZtILt5H8s10bITD04A
Jan 21 12:11:47 ip-172-31-37-126 sshd[11073]: pam_unix(sshd:session): session opened for user bitnami by (uid=0)
Jan 21 12:11:47 ip-172-31-37-126 systemd-logind[518]: New session 618 of user bitnami.
-- Subject: A new session 618 has been created for user bitnami
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID 618 has been created for the user bitnami.
--
-- The leading process of the session is 11073.
Jan 21 12:11:47 ip-172-31-37-126 systemd[1]: Started Session 618 of user bitnami.
-- Subject: A start job for unit session-618.scope has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit session-618.scope has finished successfully.
--
-- The job identifier is 5191.
Jan 21 12:12:13 ip-172-31-37-126 dhclient[420]: XMT: Solicit on eth0, interval 116290ms.
lines 1066-1125/1125 (END)

This is the results of the second commands:

    bitnami@ip-172-31-37-126:~$ sudo apachectl -t
    AH00526: Syntax error on line 2 of /opt/bitnami/apache/conf/vhosts/parse-https-vhost.conf:
    Invalid ServerName "*" use ServerAlias to set multiple server names.

    bitnami@ip-172-31-37-126:~$ cat /opt/bitnami/apache/logs/error_log | tail -n40
    [Sun Jan 17 11:04:22.314852 2021] [proxy_http:error] [pid 1125] (20014)Internal error (specific information not available): [client 51.158.78.179:41626] AH01102: error reading status line from remote server 127.0.0.1:4040
    [Sun Jan 17 11:04:22.314897 2021] [proxy:error] [pid 1125] [client 51.158.78.179:41626] AH00898: Error reading from remote server returned by /
    [Sun Jan 17 23:44:14.521264 2021] [proxy_http:error] [pid 1129] (20014)Internal error (specific information not available): [client 163.172.161.118:43872] AH01102: error reading status line from remote server 127.0.0.1:4040
    [Sun Jan 17 23:44:14.521292 2021] [proxy:error] [pid 1129] [client 163.172.161.118:43872] AH00898: Error reading from remote server returned by /
    [Mon Jan 18 10:24:52.594488 2021] [proxy_http:error] [pid 1127] (20014)Internal error (specific information not available): [client 163.172.161.118:54856] AH01102: error reading status line from remote server 127.0.0.1:4040
    [Mon Jan 18 10:24:52.594519 2021] [proxy:error] [pid 1127] [client 163.172.161.118:54856] AH00898: Error reading from remote server returned by /
    [Mon Jan 18 21:17:50.084343 2021] [proxy_http:error] [pid 1125] (20014)Internal error (specific information not available): [client 212.47.244.68:45304] AH01102: error reading status line from remote server 127.0.0.1:4040
    [Mon Jan 18 21:17:50.084380 2021] [proxy:error] [pid 1125] [client 212.47.244.68:45304] AH00898: Error reading from remote server returned by /
    [Tue Jan 19 11:26:24.538547 2021] [proxy_http:error] [pid 1129] (20014)Internal error (specific information not available): [client 163.172.161.118:58666] AH01102: error reading status line from remote server 127.0.0.1:4040
    [Tue Jan 19 11:26:24.538585 2021] [proxy:error] [pid 1129] [client 163.172.161.118:58666] AH00898: Error reading from remote server returned by /
    [Wed Jan 20 00:07:23.425020 2021] [proxy_http:error] [pid 1129] (20014)Internal error (specific information not available): [client 163.172.161.118:42224] AH01102: error reading status line from remote server 127.0.0.1:4040
    [Wed Jan 20 00:07:23.425057 2021] [proxy:error] [pid 1129] [client 163.172.161.118:42224] AH00898: Error reading from remote server returned by /
    [Wed Jan 20 10:04:59.230556 2021] [proxy_http:error] [pid 1127] (20014)Internal error (specific information not available): [client 212.47.244.68:57414] AH01102: error reading status line from remote server 127.0.0.1:4040
    [Wed Jan 20 10:04:59.230591 2021] [proxy:error] [pid 1127] [client 212.47.244.68:57414] AH00898: Error reading from remote server returned by /
    [Wed Jan 20 13:58:16.449517 2021] [mpm_prefork:notice] [pid 1124] AH00169: caught SIGTERM, shutting down

Hi @Sami117

It seems like you have a syntax error in your /opt/bitnami/apache/conf/vhosts/parse-https-vhost.conf. Have you modified it? The bnsupport-tool had trouble retrieving some of the apache-related files, could you please execute the following command in order to have a look at this file?

$ cat /opt/bitnami/apache/conf/vhosts/parse-https-vhost.conf

With that, I may be able to spot the wrong line and advice based on it.

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Sure. i think i might know what lines it were but it would be nice if i had a second pair of eyes on it.

<VirtualHost 127.0.0.1:443 _default_:443>
  ServerName *
  ServerAlias *
  SSLEngine On
  ProxyRequests       Off
  AllowEncodedSlashes NoDecode
  RequestHeader set X-Forwarded-Proto "https"
  RequestHeader set X-Forwarded-Port "443"
  SSLCertificateFile "/opt/bitnami/apache/conf/bitnami/certs/server.crt"
  SSLCertificateKeyFile "/opt/bitnami/apache/conf/bitnami/certs/server.key"
  ProxyPass /parse http://127.0.0.1:1337/parse
  ProxyPassReverse /parse http://127.0.0.1:1337/parse
  ProxyPass / http://127.0.0.1:4040/
  ProxyPassReverse / http://127.0.0.1:4040/
</VirtualHost>

Hi @Sami117

Have you modified the file? The ServerName * directive is incorrectly placed there. The default content of that file is:

<VirtualHost 127.0.0.1:443 _default_:443>
  ServerAlias *
  ProxyRequests       Off
  AllowEncodedSlashes NoDecode
  RequestHeader set X-Forwarded-Proto "https"
  RequestHeader set X-Forwarded-Port "443"
  SSLCertificateFile "/opt/bitnami/apache/conf/bitnami/certs/server.crt"
  SSLCertificateKeyFile "/opt/bitnami/apache/conf/bitnami/certs/server.key"
  ProxyPass /parse http://127.0.0.1:1337/parse
  ProxyPassReverse /parse http://127.0.0.1:1337/parse
  ProxyPass / http://127.0.0.1:4040/
  ProxyPassReverse / http://127.0.0.1:4040/
</VirtualHost>

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.