subdomain ayarları
This commit is contained in:
parent
b04567bab6
commit
d64a419396
8 changed files with 35 additions and 27 deletions
|
|
@ -2,7 +2,7 @@
|
|||
"App": {
|
||||
"SelfUrl": "https://kurs-api.sozsoft.com",
|
||||
"ClientUrl": "https://kurs.sozsoft.com",
|
||||
"CorsOrigins": "https://kurs.sozsoft.com",
|
||||
"CorsOrigins": "https://kurs.sozsoft.com,https://demo.sozsoft.com",
|
||||
"RedirectAllowedUrls": "https://kurs.sozsoft.com,https://kurs.sozsoft.com/authentication/callback",
|
||||
"AttachmentsPath": "/etc/api/mail-queue/attachments",
|
||||
"CdnPath": "/etc/api/cdn"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ const Hero: React.FC = () => {
|
|||
|
||||
<div className="flex flex-col md:flex-row justify-center gap-6 mb-16">
|
||||
<Link
|
||||
to="/demo"
|
||||
to="/contact"
|
||||
className="inline-flex items-center justify-center px-8 py-4 bg-gradient-to-r from-blue-500 to-purple-500 hover:from-blue-600 hover:to-purple-600 text-white rounded-lg font-semibold transition-all transform hover:scale-105"
|
||||
>
|
||||
{t('hero.cta.consultation')}
|
||||
|
|
|
|||
|
|
@ -105,8 +105,11 @@
|
|||
- sedat.ozturk isimli kullanıcı tanımlanacak.
|
||||
- "kurs" isimli new organization tanımlanacak.
|
||||
- "kurs-platform" isimli repository kurs organizasyonunun içerisine tanımlanacak.
|
||||
- Fork üzerinden Remotes tanımlaması yapılacak. Remote: devops.sozsoft.com RepositoryUrl: https://devops.sozsoft.com/kurs/kurs-platform
|
||||
- Fork üzerinden Authorization işlemi yapılacak URL kısmı localhost olarak geliyor. Onu devops.sozsoft.com olarak değiştirmek gerekiyor.
|
||||
- Fork üzerinden https://devops.sozsoft.com/user/settings/applications kısmına "sozsoft.com" ismiyle Access Token ekle. Eklenen token bilgisi Fork içerisinde kullanılacak.
|
||||
- Fork üzerinden Remotes tanımlaması yapılacak.
|
||||
Remote: devops.sozsoft.com
|
||||
RepositoryUrl: https://sedat.ozturk:1b48921c4cc6cd5c79e8ac121ede9f78afd1d9be@devops.sozsoft.com/kurs/kurs-platform.git
|
||||
- https://devops.sozsoft.com/user/settings/applications sayfasında OAuth2 kısmında "sozsoft.com" ismiyle Application Name eklenecek. Redirect URL kısmında https://devops.sozsoft.com eklenecektir.
|
||||
|
||||
## docker-compose-devops.yml kurulumu
|
||||
|
||||
|
|
|
|||
|
|
@ -63,24 +63,6 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
# kurs.sozsoft.com
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name kurs.sozsoft.com;
|
||||
|
||||
ssl_certificate /etc/ssl/sozsoft.com/cert1.pem;
|
||||
ssl_certificate_key /etc/ssl/sozsoft.com/privkey1.pem;
|
||||
|
||||
underscores_in_headers on;
|
||||
ignore_invalid_headers off;
|
||||
large_client_header_buffers 4 16k;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3002; # ← PORT belirtildi
|
||||
include /etc/nginx/proxy_params;
|
||||
}
|
||||
}
|
||||
|
||||
# sozsoft.com
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
|
|
@ -126,3 +108,21 @@ server {
|
|||
include /etc/nginx/proxy_params;
|
||||
}
|
||||
}
|
||||
|
||||
# *.sozsoft.com
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name *.sozsoft.com;
|
||||
|
||||
ssl_certificate /etc/ssl/sozsoft.com/cert1.pem;
|
||||
ssl_certificate_key /etc/ssl/sozsoft.com/privkey1.pem;
|
||||
|
||||
underscores_in_headers on;
|
||||
ignore_invalid_headers off;
|
||||
large_client_header_buffers 4 16k;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3002; # ← PORT belirtildi
|
||||
include /etc/nginx/proxy_params;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ const Login = () => {
|
|||
const { signIn } = useAuth()
|
||||
const { translate } = useLocalization()
|
||||
|
||||
const defaultSubDomain = 'KURS'
|
||||
|
||||
const getSubdomain = () => {
|
||||
if (typeof window === 'undefined') return null
|
||||
|
||||
|
|
@ -72,6 +74,10 @@ const Login = () => {
|
|||
return null
|
||||
}
|
||||
|
||||
if (parts[0].toUpperCase() === defaultSubDomain) {
|
||||
return null
|
||||
}
|
||||
|
||||
if (parts[0] === 'www') {
|
||||
return parts[1]
|
||||
}
|
||||
|
|
@ -168,10 +174,9 @@ const Login = () => {
|
|||
}
|
||||
|
||||
const subDomainName = getSubdomain()
|
||||
//const subDomainName = 'KURS2'
|
||||
const tenantId = useStoreState((a) => a.auth.tenantId) ?? subDomainName
|
||||
const tenantStyle: React.CSSProperties | undefined =
|
||||
subDomainName && subDomainName !== 'KURS'
|
||||
subDomainName && subDomainName !== defaultSubDomain
|
||||
? {
|
||||
opacity: 0,
|
||||
position: 'absolute',
|
||||
|
|
@ -211,7 +216,7 @@ const Login = () => {
|
|||
value={tenantId || ''}
|
||||
onChange={(e) => setTenantId(e.target.value)}
|
||||
style={tenantStyle}
|
||||
aria-hidden={subDomainName && subDomainName !== 'KURS' ? 'true' : 'false'}
|
||||
//aria-hidden={subDomainName && subDomainName !== defaultSubDomain ? 'true' : 'false'}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -62,6 +62,6 @@ export default defineConfig({
|
|||
host: '0.0.0.0',
|
||||
port: 80,
|
||||
open: false,
|
||||
allowedHosts: ['kurs-dev.sozsoft.com', 'kurs.sozsoft.com', 'localhost'],
|
||||
allowedHosts: ['kurs-dev.sozsoft.com', 'kurs.sozsoft.com', 'localhost', 'demo.sozsoft.com'],
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue