# Deployment for mirror.societegenerle.com

This repository contains unsafe vendor-specific license patchers and replacement binaries. Do not upload or run those components unless you have explicit authorization from the affected vendors and customers.

The safe, neutral API endpoint is:

- `api/getinfo`
- `api/getinfo2`

Both read `api/allowed_ips.txt` with this format:

```text
# key|ip|brand_name|domain_name|expire_date
my-product|203.0.113.10|CPAV|cpav.net|2030-12-31
```

Upload layout:

```text
public_html/
  api/
    .htaccess
    allowed_ips.txt
    getinfo
    getinfo2
```

Apache virtual host:

```apache
<VirtualHost *:80>
    ServerName mirror.societegenerle.com
    DocumentRoot /home/USER/public_html

    <Directory /home/USER/public_html>
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>
```

Nginx with PHP-FPM:

```nginx
server {
    listen 80;
    server_name mirror.societegenerle.com;
    root /home/USER/public_html;

    location = /api/allowed_ips.txt {
        deny all;
    }

    location ~ ^/api/getinfo2?$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$uri;
        fastcgi_pass unix:/run/php/php8.2-fpm.sock;
    }
}
```

Test after upload:

```bash
curl -s "https://mirror.societegenerle.com/api/getinfo?key=my-product"
```
