So after finishing my Django Project everything works fine on the test database server with following settings:
DATABASES = {
'default': {
'ENGINE':'sql_server.pyodbc',
'NAME':'xxx',
'USER':'xxx',
'PASSWORD':'xxx',
'HOST':'192.168.10.40',
'OPTIONS': {
'driver': 'ODBC Driver 13 for SQL Server',
},
},
'200000': {
'ENGINE':'sql_server.pyodbc',
'NAME':'xxx',
'USER':'xxx',
'PASSWORD':'xxx',
'HOST':'192.168.10.40',
'OPTIONS': {
'driver': 'ODBC Driver 13 for SQL Server',
},
},
}
but after trying to change it to the new database server like:
DATABASES = {
'default': {
'ENGINE':'sql_server.pyodbc',
'NAME':'xxx',
'USER':'xxx',
'PASSWORD':'xxx',
'HOST':'192.168.10.36/ATS',
'OPTIONS': {
'driver': 'ODBC Driver 13 for SQL Server',
},
},
'200000': {
'ENGINE':'sql_server.pyodbc',
'NAME':'xxx',
'USER':'xxx',
'PASSWORD':'xxx',
'HOST':'192.168.10.36\ATS',
'OPTIONS': {
'driver': 'ODBC Driver 13 for SQL Server',
},
},
}
i get a server error 500 after like 2minutes when i change the database server back to the old one it works again what problems can cause this error? can it be that i got an instance on the server and the /ATS is causing the problem?
After some research and setting debug to true in django i get the following error msg:
OperationalError at / ('HYT00', '[HYT00] [unixODBC][Microsoft][ODBC Driver 13 for SQL Server]Login timeout expired (0) (SQLDriverConnect)')
In the Apache error log there is following error:
[Tue Feb 12 08:02:24.905988 2019] [ssl:warn] [pid 12571:tid 139890139985088] AH01916: Init: (127.0.1.1:443) You configured HTTP(80) on the standard HTTPS(443) port! [Tue Feb 12 08:02:24.918022 2019] [ssl:warn] [pid 12572:tid 139890139985088] AH01916: Init: (127.0.1.1:443) You configured HTTP(80) on the standard HTTPS(443) port!
When i run the django app on visual studio it works fine with the new sql server settings. only after deploying it to apache with the new sql server settings i cant establish a connection.