Re: [modwsgi] Re: When use mod_wsgi.../apachectl status, Error loading https://localhost:443/server-status: SSL error

2018-02-21 Thread Rafael Karosuo
Ohh ok testing right away!, thanks

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.


Re: [modwsgi] Re: When use mod_wsgi.../apachectl status, Error loading https://localhost:443/server-status: SSL error

2018-02-21 Thread Rafael Karosuo
BTW the things that did not show anything about the 443 were when mod_wsgi 
was off.

Because when I restart the mod_wsgi I can see the port being used by 
mod_wsgi when use

> sudo netstat -tulpn

also when I run

> lsof -i :443

 

>  

 

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.


Re: [modwsgi] Re: When use mod_wsgi.../apachectl status, Error loading https://localhost:443/server-status: SSL error

2018-02-21 Thread Graham Dumpleton
Missed it.

Don't set:

--port=443

If you want HTTPS only with redirect from port 80 to 443 use:

--port 80 --https-port=443 --https-only

Graham

> On 22 Feb 2018, at 2:30 pm, Rafael Karosuo  wrote:
> 
> Ok, the apache instance that where active (for the cpanel/whm I suppose) is 
> already disabled, I used
> WHM >> Home >> Service Configuration >> Service Manager
> Because using:
> /usr/sbin/apachectl stop 
> 
> was temporal, cpanel/whm was looking for that process and if it was stopped, 
> it can be re-started automatically. 
> 
> Anyway, so as far as I know, no other apache instance is running.
> I ran
> lsof -i :443
> nothing comes out.
> Also ran
> sudo netstat -tulpn
> And I can see the :80 port and :8000 port listening and being used by the 
> mod_wsgi that I have as test on those ports, but no 443...
> 
> Actually I ran all the commands I found using netstat and non of them showed 
> the 443 as listening port, could it be that the port is not open and 
> listening? (just wandering)
> 
> Also ran
> traceroute -p 443 mytademex.com
> 
>  And it seems that no difference is detected when mod_wsgi is on or off.
> Always hits
> With mod_wsgi stopped
> traceroute to mytademex.com (127.0.0.1), 30 hops max, 60 byte packets
>  1  localhost (127.0.0.1)  0.078 ms  0.086 ms  0.037 ms
> With mod_wsgi started
> traceroute to mytademex.com (127.0.0.1), 30 hops max, 60 byte packets
>  1  localhost (127.0.0.1)  0.124 ms  0.042 ms  0.052 ms
> 
> I also re-ran 
> telnet mytademex.com 443
>  and it seems that just stop connection, so thinking that no one is listening?
> Trying 127.0.0.1...
> telnet: connect to address 127.0.0.1: Connection refused
> Trying 108.179.223.220...
> telnet: connect to address 108.179.223.220: Connection refused
> 
> Also tested the above telnet command and writing some http request
> Trying 127.0.0.1...
> Connected to mytademex.com.
> Escape character is '^]'.
> GET / HTTP/1.1 ###wrote this request
> Host: mytademex.com ###wrote this request
> HTTP/1.1 302 Found
> Date: Thu, 22 Feb 2018 03:27:46 GMT
> Server: Apache
> Location: https://mytademex.com:None/
> Content-Length: 211
> Connection: close
> Content-Type: text/html; charset=iso-8859-1
> 
> 
> 302 Found
> 
> Found
> The document has moved https://mytademex.com:None/;>here.
> 
> Connection closed by foreign host.
>  
> I also tested the above with my mytademex.com:80 HTTPS instance that's 
> running without any visible errors, and I have
> Trying 127.0.0.1...
> Connected to mytademex.com.
> Escape character is '^]'.
> GET / HTTP/1.1 ###My manual request
> Host: mytademex.com ###My manual request
> HTTP/1.1 302 Found
> Date: Thu, 22 Feb 2018 03:27:05 GMT
> Server: Apache
> Content-Length: 0
> Location: /login/
> x-xss-protection: 1; mode=block
> Vary: Cookie
> X-Frame-Options: DENY
> x-content-type-options: nosniff
> Connection: close
> Content-Type: text/html; charset=utf-8
> Connection closed by foreign host.
> 
> In which I can recognize the "location" part as "/login/" one of my urls. 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to modwsgi+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to modwsgi@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/modwsgi 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.


Re: [modwsgi] Re: When use mod_wsgi.../apachectl status, Error loading https://localhost:443/server-status: SSL error

2018-02-21 Thread Rafael Karosuo
Ok, the apache instance that where active (for the cpanel/whm I suppose) is 
already disabled, I used
>
> WHM >> Home >> Service Configuration >> Service Manager

Because using:

> /usr/sbin/apachectl stop 


was temporal, cpanel/whm was looking for that process and if it was 
stopped, it can be re-started automatically. 

Anyway, so as far as I know, no other apache instance is running.
I ran

> lsof -i :443

nothing comes out.
Also ran

> sudo netstat -tulpn

And I can see the :80 port and :8000 port listening and being used by the 
mod_wsgi that I have as test on those ports, but no 443...

Actually I ran all the commands I found using *netstat* and non of them 
showed the 443 as listening port, could it be that the port is not open and 
listening? (just wandering)

Also ran

> traceroute -p 443 mytademex.com


 And it seems that no difference is detected when mod_wsgi is on or off.
Always hits
*With mod_wsgi stopped*
traceroute to mytademex.com (127.0.0.1), 30 hops max, 60 byte packets
 1  localhost (127.0.0.1)  0.078 ms  0.086 ms  0.037 ms
*With mod_wsgi started*
traceroute to mytademex.com (127.0.0.1), 30 hops max, 60 byte packets
 1  localhost (127.0.0.1)  0.124 ms  0.042 ms  0.052 ms

I also re-ran 

> telnet mytademex.com 443

 and it seems that just stop connection, so thinking that no one is 
listening?

> Trying 127.0.0.1...
> telnet: connect to address 127.0.0.1: Connection refused
> Trying 108.179.223.220...
> telnet: connect to address 108.179.223.220: Connection refused


Also tested the above telnet command and writing some http request

> Trying 127.0.0.1...
> Connected to mytademex.com.
> Escape character is '^]'.
> GET / HTTP/1.1 *###wrote this request*
> Host: mytademex.com *###wrote this request*
> HTTP/1.1 302 Found
> Date: Thu, 22 Feb 2018 03:27:46 GMT
> Server: Apache
> Location: https://mytademex.com:None/
> Content-Length: 211
> Connection: close
> Content-Type: text/html; charset=iso-8859-1
> 
> 
> 302 Found
> 
> Found
> The document has moved  href="https://mytademex.com:None/;>here.
> 
> Connection closed by foreign host.

 
I also tested the above with my mytademex.com:80 HTTPS instance that's 
running without any visible errors, and I have

> Trying 127.0.0.1...
> Connected to mytademex.com.
> Escape character is '^]'.
> GET / HTTP/1.1 *###My manual request*
> Host: mytademex.com *###My manual request*
> HTTP/1.1 302 Found
> Date: Thu, 22 Feb 2018 03:27:05 GMT
> Server: Apache
> Content-Length: 0
> Location: /login/
> x-xss-protection: 1; mode=block
> Vary: Cookie
> X-Frame-Options: DENY
> x-content-type-options: nosniff
> Connection: close
> Content-Type: text/html; charset=utf-8
> Connection closed by foreign host.


In which I can recognize the "location" part as "/login/" one of my urls. 

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.


Re: [modwsgi] Re: When use mod_wsgi.../apachectl status, Error loading https://localhost:443/server-status: SSL error

2018-02-21 Thread Graham Dumpleton


> On 22 Feb 2018, at 1:37 pm, Rafael Karosuo  wrote:
> 
> Stop mod_wsgi-express and do the same thing.
> curl -v https://mytademex.com
> * About to connect() to mytademex.com port 443 (#0)
> *   Trying 127.0.0.1... Connection refused
> *   Trying 108.179.223.220... Connection refused
> * couldn't connect to host
> * Closing connection #0
> curl: (7) couldn't connect to host
>  
> Does it say can't even connect, or does it still connect?
> Does not connect. 
> Do you have any environment variables that may be set which is causing a 
> proxy to be used?
> I don't know, only env vars that I set are PYTHONPATH, and 
> DJANGO_SETTINGS_MODULE
> But the VPS has WHM and CPanel, I don't know if they have something set.
> If you have 'telnet' on the host, what happens if you type 'telnet 
> mytademex.com  443' and press return
> Before I stoped mod_wsgi
> Trying 127.0.0.1...
> Connected to mytademex.com.
> Escape character is '^]'. ### From top 127... to here is what appeared when I 
> ran command
> hola  ### I typed this and hit enter again
> HTTP/1.1 400 Bad Request
> Date: Thu, 22 Feb 2018 02:31:02 GMT
> Server: Apache
> Content-Length: 226
> Connection: close
> Content-Type: text/html; charset=iso-8859-1
> 
> 
> 
> 400 Bad Request
> 
> Bad Request
> Your browser sent a request that this server could not understand.
> 
> 
> Connection closed by foreign host.
> After I stoped mod_wsgi
> Trying 127.0.0.1...
> Connected to mytademex.com.
> Escape character is '^]'.
> hola
> HTTP/1.1 400 Bad Request
> Date: Thu, 22 Feb 2018 02:31:02 GMT
> Server: Apache
> Content-Length: 226
> Connection: close
> Content-Type: text/html; charset=iso-8859-1

If you are still connecting to something at this point when running:

'telnet mytademex.com  443'

then something else is listening on port 443.

Usually if you are using CPanel it would have its own Apache instance.

But then you said curl failed when mod_wsgi-express wasn't running.

Another command you can use to test if something listening on a port and where 
traffic is going is:

traceroute -p 443 mytademex.com  

and you can use lsof and netstat to check what is listening on ports.

Right now it isn't clear whether something else isn't using that port that you 
are connecting to.

Graham

> 
> 
> 
> 400 Bad Request
> 
> Bad Request
> Your browser sent a request that this server could not understand.
> 
> 
> Connection closed by foreign host.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to modwsgi+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to modwsgi@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/modwsgi 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.


Re: [modwsgi] Re: When use mod_wsgi.../apachectl status, Error loading https://localhost:443/server-status: SSL error

2018-02-21 Thread Rafael Karosuo
I restarted the mod_wsgi and ran curl -v https://mytademex.com from my 
ubuntu machine.
I have this result

> * Rebuilt URL to: https://mytademex.com/
> *   Trying 108.179.223.220...
> * Connected to mytademex.com (108.179.223.220) port 443 (#0)
> * found 148 certificates in /etc/ssl/certs/ca-certificates.crt
> * found 597 certificates in /etc/ssl/certs
> * ALPN, offering http/1.1
> * gnutls_handshake() failed: An unexpected TLS packet was received.
> * Closing connection 0
> curl: (35) gnutls_handshake() failed: An unexpected TLS packet was 
> received.



-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.


Re: [modwsgi] Re: When use mod_wsgi.../apachectl status, Error loading https://localhost:443/server-status: SSL error

2018-02-21 Thread Rafael Karosuo

>
> Stop mod_wsgi-express and do the same thing.
>
curl -v https://mytademex.com
* About to connect() to mytademex.com port 443 (#0)
*   Trying 127.0.0.1... Connection refused
*   Trying 108.179.223.220... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host
 

> Does it say can't even connect, or does it still connect?
>
Does not connect. 

> Do you have any environment variables that may be set which is causing a 
> proxy to be used?
>
I don't know, only env vars that I set are PYTHONPATH, and 
DJANGO_SETTINGS_MODULE
But the VPS has WHM and CPanel, I don't know if they have something set.

> If you have 'telnet' on the host, what happens if you type 'telnet 
> mytademex.com 443' and press return
>
*Before I stoped mod_wsgi*
Trying 127.0.0.1...
Connected to mytademex.com.
Escape character is '^]'. *### From top 127... to here is what appeared 
when I ran command*
hola  *### I typed this and hit enter again*
HTTP/1.1 400 Bad Request
Date: Thu, 22 Feb 2018 02:31:02 GMT
Server: Apache
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1



400 Bad Request

Bad Request
Your browser sent a request that this server could not understand.


Connection closed by foreign host.
*After I stoped mod_wsgi*
Trying 127.0.0.1...
Connected to mytademex.com.
Escape character is '^]'.
hola
HTTP/1.1 400 Bad Request
Date: Thu, 22 Feb 2018 02:31:02 GMT
Server: Apache
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1



400 Bad Request

Bad Request
Your browser sent a request that this server could not understand.


Connection closed by foreign host.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.


Re: [modwsgi] Re: When use mod_wsgi.../apachectl status, Error loading https://localhost:443/server-status: SSL error

2018-02-21 Thread Graham Dumpleton
Stop mod_wsgi-express and do the same thing.

Does it say can't even connect, or does it still connect?

Do you have any environment variables that may be set which is causing a proxy 
to be used?

If you have 'telnet' on the host, what happens if you type 'telnet 
mytademex.com  443' and press return

Graham

> On 22 Feb 2018, at 1:23 pm, Rafael Karosuo  wrote:
> 
> Oh ok, I ran these one. 
> python manage.py runmodwsgi --setup-only --port=443 --user mytademe --group 
> mytademe --server-root=/etc/mod_wsgi-443 --server-name mytademex.com 
> --ssl-certificate /etc/pki/tls/certs/mytademex --https-only  --startup-log 
> --access-log 
> 
> I have a VPS, so I did SSH to it, then ran the curl -v.
> 
> Got this...
> 
> * About to connect() to mytademex.com port 443 (#0)
> *   Trying 127.0.0.1... connected
> * Connected to mytademex.com (127.0.0.1) port 443 (#0)
> * Initializing NSS with certpath: sql:/etc/pki/nssdb
> *   CAfile: /etc/pki/tls/certs/ca-bundle.crt
>   CApath: none
> * NSS error -12263
> * Closing connection #0
> * SSL connect error
> curl: (35) SSL connect error
> 
> So I rechecked the base directory, then found that I have
> /etc/pki/tls/certs/
> mytademexCA_bundle.crt  mytademex.crt   mytademex.key
> 
> The CA one is the bundle that I think is the chain file, so I deleted it.
> 
> Ran again the command the command and tested the
> curl -v https://mytademex.com
> 
> And get the same:
> * About to connect() to mytademex.com port 443 (#0)
> *   Trying 127.0.0.1... connected
> * Connected to mytademex.com (127.0.0.1) port 443 (#0)
> * Initializing NSS with certpath: sql:/etc/pki/nssdb
> *   CAfile: /etc/pki/tls/certs/ca-bundle.crt
>   CApath: none
> * NSS error -12263
> * Closing connection #0
> * SSL connect error
> curl: (35) SSL connect error
>  
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to modwsgi+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to modwsgi@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/modwsgi 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.


[modwsgi] Re: When use mod_wsgi.../apachectl status, Error loading https://localhost:443/server-status: SSL error

2018-02-21 Thread Rafael Karosuo
Oh ok, I ran these one. 

> python manage.py runmodwsgi --setup-only --port=443 --user mytademe 
> --group mytademe --server-root=/etc/mod_wsgi-443 --server-name 
> mytademex.com --ssl-certificate /etc/pki/tls/certs/mytademex --https-only  
> --startup-log --access-log 


I have a VPS, so I did SSH to it, then ran the curl -v.

Got this...

* About to connect() to mytademex.com port 443 (#0)
> *   Trying 127.0.0.1... connected
> * Connected to mytademex.com (127.0.0.1) port 443 (#0)
> * Initializing NSS with certpath: sql:/etc/pki/nssdb
> *   CAfile: /etc/pki/tls/certs/ca-bundle.crt
>   CApath: none
> * NSS error -12263
> * Closing connection #0
> * SSL connect error
> curl: (35) SSL connect error
>

So I rechecked the base directory, then found that I have

> /etc/pki/tls/certs/
> mytademexCA_bundle.crt  mytademex.crt   mytademex.key


The CA one is the bundle that I think is the chain file, so I deleted it.

Ran again the command the command and tested the

> curl -v https://mytademex.com


And get the same:

> * About to connect() to mytademex.com port 443 (#0)
> *   Trying 127.0.0.1... connected
> * Connected to mytademex.com (127.0.0.1) port 443 (#0)
> * Initializing NSS with certpath: sql:/etc/pki/nssdb
> *   CAfile: /etc/pki/tls/certs/ca-bundle.crt
>   CApath: none
> * NSS error -12263
> * Closing connection #0
> * SSL connect error
> curl: (35) SSL connect error

 

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.


[modwsgi] Re: When use mod_wsgi.../apachectl status, Error loading https://localhost:443/server-status: SSL error

2018-02-21 Thread Rafael Karosuo
BTW, startup_log does not have anything at all.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.


Re: [modwsgi] Re: When use mod_wsgi.../apachectl status, Error loading https://localhost:443/server-status: SSL error

2018-02-21 Thread Graham Dumpleton


> On 22 Feb 2018, at 12:48 pm, Rafael Karosuo  wrote:
> 
> I just added the part of --ssl-certificate, now running
> 
> python manage.py runmodwsgi --setup-only --port=443 --user myuser --group 
> mygroup --server-root=/etc/mod_wsgi-443 --server-name mytademex.com 
> --ssl-certificate-file /etc/pki/tls/certs/mytademex.crt 
> --ssl-certificate-key-file /etc/pki/tls/certs/mytademex.key 
> --ssl-certificate-chain-file /etc/pki/tls/certs/mytademexCA_bundle.crt 
> --ssl-certificate /etc/pki/tls/certs/mytademex --https-only  --startup-log 
> --access-log

You want:

--ssl-certificate /etc/pki/tls/certs/mytademex

or:

--ssl-certificate-file /etc/pki/tls/certs/mytademex.crt 
--ssl-certificate-key-file /etc/pki/tls/certs/mytademex.key

not both.

If the certificates are signed by official certificate authorities, you 
shouldn't need:

--ssl-certificate-chain-file /etc/pki/tls/certs/mytademexCA_bundle.crt

Try getting on the same computer as the server is and use curl to debug, not 
your browser.

Run:

curl -v https://mytademex.com 

What do you get?

Graham

>  but it still says the same SSL_PROTOCOL_ERR in my browser when I try to 
> connect to the site.
> 
> I also tried adding "localhost myhostname.com" and "my.ip myhostname.com" at 
> /etc/hosts with no success.
> 
> I'm still not getting any error in my error_log and can not go into apachectl 
> status
> 
> Any idea of what can I do to fix it?
> 
> Thanks again in advance
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to modwsgi+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to modwsgi@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/modwsgi 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.


[modwsgi] Re: When use mod_wsgi.../apachectl status, Error loading https://localhost:443/server-status: SSL error

2018-02-21 Thread Rafael Karosuo
I just added the part of *--ssl-certificate*, now running

python manage.py runmodwsgi --setup-only --port=443 --user myuser --group 
> mygroup --server-root=/etc/mod_wsgi-443 --server-name mytademex.com 
> --ssl-certificate-file /etc/pki/tls/certs/mytademex.crt 
> --ssl-certificate-key-file /etc/pki/tls/certs/mytademex.key 
> --ssl-certificate-chain-file /etc/pki/tls/certs/mytademexCA_bundle.crt 
> --ssl-certificate /etc/pki/tls/certs/mytademex --https-only  --startup-log 
> --access-log


 but it still says the same *SSL_PROTOCOL_ERR* in my browser when I try to 
connect to the site.

I also tried adding "*localhost myhostname.com*" and "*my.ip myhostname.com*" 
at */etc/hosts* with no success.

I'm still not getting any error in my *error_log* and can not go into 
*apachectl status*

Any idea of what can I do to fix it?

Thanks again in advance

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.


Re: [modwsgi] Lose connection to MS SQL server when i run through apache

2018-02-21 Thread Graham Dumpleton
Are you setting any environment variables in your personal user account to have 
it connect normally when run under your own user account using the development 
server? These environment variables will not be set when run under Apache.

Graham 

> On 22 Feb 2018, at 6:45 am, Jonathan Schmitt  wrote:
> 
> I am trying to deploy my django project on my company LAN. I am able to get 
> the site working, however, I lose connectivity to my Microsoft SQL Server 
> when I run the site through apache and modwsgi. Everything works fine in the 
> development environment. It seems that when django is trying to connect using 
> pyodbc is tries to connect as user 'MEDSTAR\COMPUTER_NAME' instead of 'user': 
> ' ' which i put in my django settings file.  This is what my db settings are 
> in my settings.py files:
> 
> 
> 
> 'mosaiq': {
> 'ENGINE': 'sql_server.pyodbc',
> 'NAME': 'MOSAIQ',
> 'USER': '',
> 'PASSWORD': '',
> 'HOST': 'MOSAIQ01T', 
> 'PORT': '', 
> 
> 'OPTIONS': {'driver': 'ODBC Driver 11 for SQL Server',
> }, 
> 
> 
> 
> 
> ('28000', "[28000] [Microsoft][ODBC Driver 11 for SQL Server][SQL 
> Server]Login failed for user 'MEDSTAR\COMPUTER_NAME$'. (18456) 
> (SQLDriverConnect)")
> 
> 
> 
> Request Method:   GET
> Request URL:  http://172.23.81.185/patient/165033E/1/
> Django Version:   1.11.3
> Exception Type:   Error
> Exception Value:  
> ('28000', "[28000] [Microsoft][ODBC Driver 11 for SQL Server][SQL 
> Server]Login failed for user 'MEDSTAR\\RAMFSHONCDT472$'. (18456) 
> (SQLDriverConnect)")
> Exception Location:   
> c:\users\jxs215\appdata\local\continuum\anaconda3\envs\py3_env\lib\site-packages\sql_server\pyodbc\base.py
>  in get_new_connection, line 309
> Python Executable:
> C:\Users\jxs215\wamp64\bin\apache\apache2.4.27\bin\httpd.exe
> Python Version:   3.6.2
> Python Path:  
> ['C:\\users\\jxs215\\wamp64\\www\\jons_project\\compare\\apps',
>  'C:\\users\\jxs215\\wamp64\\www\\jons_project',
>  
> 'C:\\Users\\jxs215\\AppData\\Local\\Continuum\\Anaconda3\\envs\\py3_env\\python36.zip',
>  
> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\DLLs',
>  
> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib',
>  'C:\\Users\\jxs215\\wamp64\\bin\\apache\\apache2.4.27\\bin',
>  'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env',
>  
> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages',
>  
> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages\\win32',
>  
> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages\\win32\\lib',
>  
> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages\\Pythonwin',
>  
> 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages\\setuptools-27.2.0-py3.6.egg',
>  'C:\\Users\\jxs215\\wamp64\\www\\jons_project']
> Server time:  Wed, 21 Feb 2018 19:38:09 +00
> 
> 
> 
> Does anyone know how to get passed this problem? 
> 
> 
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to modwsgi+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to modwsgi@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/modwsgi 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.


[modwsgi] Lose connection to MS SQL server when i run through apache

2018-02-21 Thread Jonathan Schmitt


I am trying to deploy my django project on my company LAN. I am able to get 
the site working, however, I lose connectivity to my Microsoft SQL Server 
when I run the site through apache and modwsgi. Everything works fine in 
the development environment. It seems that when django is trying to connect 
using pyodbc is tries to connect as user 'MEDSTAR\COMPUTER_NAME' instead of 
'user': ' ' which i put in my django settings file.  This is what my db 
settings are in my settings.py files:


'mosaiq': {
'ENGINE': 'sql_server.pyodbc',
'NAME': 'MOSAIQ',
'USER': '',
'PASSWORD': '',
'HOST': 'MOSAIQ01T', 
'PORT': '', 

'OPTIONS': {'driver': 'ODBC Driver 11 for SQL Server',
}, 



('28000', "[28000] [Microsoft][ODBC Driver 11 for SQL Server][SQL 
Server]Login failed for user 'MEDSTAR\COMPUTER_NAME$'. (18456) 
(SQLDriverConnect)")


Request Method: GET
Request URL: http://172.23.81.185/patient/165033E/1/
Django Version: 1.11.3
Exception Type: Error
Exception Value: 

('28000', "[28000] [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Login 
failed for user 'MEDSTAR\\RAMFSHONCDT472$'. (18456) (SQLDriverConnect)")

Exception Location: 
c:\users\jxs215\appdata\local\continuum\anaconda3\envs\py3_env\lib\site-packages\sql_server\pyodbc\base.py
 
in get_new_connection, line 309
Python Executable: 
C:\Users\jxs215\wamp64\bin\apache\apache2.4.27\bin\httpd.exe
Python Version: 3.6.2
Python Path: 

['C:\\users\\jxs215\\wamp64\\www\\jons_project\\compare\\apps',
 'C:\\users\\jxs215\\wamp64\\www\\jons_project',
 
'C:\\Users\\jxs215\\AppData\\Local\\Continuum\\Anaconda3\\envs\\py3_env\\python36.zip',
 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\DLLs',
 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib',
 'C:\\Users\\jxs215\\wamp64\\bin\\apache\\apache2.4.27\\bin',
 'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env',
 
'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages',
 
'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages\\win32',
 
'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages\\win32\\lib',
 
'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages\\Pythonwin',
 
'c:\\users\\jxs215\\appdata\\local\\continuum\\anaconda3\\envs\\py3_env\\lib\\site-packages\\setuptools-27.2.0-py3.6.egg',
 'C:\\Users\\jxs215\\wamp64\\www\\jons_project']

Server time: Wed, 21 Feb 2018 19:38:09 +00



Does anyone know how to get passed this problem? 





-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.