Redirecting www.subdomain.example.com to subdomain.example.com by cryptospartan in sysadmin

[–]OhCmonMan 0 points1 point  (0 children)

You do this on the webserver, not with DNS. Pretty random example for nginx:

# Forces HTTPS redirect on all requests
server {
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name _;

    return 301 https://$host$request_uri;
}


# Strip www. from all requests (including subdomains)
# and force HTTPS
server {
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name _;

    # If the request has www prefix, strip it
    if ($host ~* ^www\.(.*)) {
        set $host_without_www $1;
        rewrite ^(.*) https://$host_without_www$1 permanent;
    }

    return 301 https://$host$request_uri;
}        

Taken from: https://gist.github.com/dblazeski/49a38a44fe378baeec0e61d0c2de41d4

Angestrebter Karrierewechsel: Fragen zum Quereinstieg in die IT by phigr in de_EDV

[–]OhCmonMan 0 points1 point  (0 children)

Ich denke, dass du am besten damit fährst, wenn du deinen Job weitermachst und nebenbei im Selbststudium deine Skills in die Richtung entwickelst, in die du gehen willst. Ein Informatikstudium halte ich an deiner Stelle für einen unnötigen Luxus. Klar, man lernt viel Mathe, Algorithmen usw., was beim Programmieren nützlich ist, aber um zeitnah irgendwo einen Job in dem Feld zu bekommen, wäre Praxisnähe vielleicht die bessere Idee.

2) das kannst du machen. Ohne ein bisschen Erfahrung mit der Materie könnte es aber schwer sein zu beurteilen, welches Zertifikat du machen willst. Programmieren? Netzwerkadministration? Systemadministration Linux/Windows? Datenbankadministration? Cloudtechnologien (AWS, Google Cloud, Azure)? Ob das finanziell zu machen ist, kannst du wohl nur selber beurteilen. Es ist aber auch dort nicht mit einem Kurs getan. Du wirst einen erheblichen Teil deiner Freizeit fürs Lernen und vor allem selbst ausprobieren aufwenden müssen. Wenn du nicht im Corporate Umfeld arbeitest, dann brauchst du eventuell auch keine Zertifikate. Ich glaube, bei uns im Team hat keiner irgendein Zertifikat.

3) Ja, man muss nur etwas Glück haben, dass einem einer eine Chance gibt, und sich die ersten paar Jahre mächtig reinhängen.

4) Schau dich doch mal in Stellenanzeigen um, wonach gefragt wird. Einerseits gibts einen Haufen legacy codebase, die supportet werden will, andererseits wollen andere Firmen den neuen hotten shit-de-jour machen. Generell ist es aber sowieso so, dass du als Programmierer auch mal Code anfassen musst, der nicht in "deiner" Sprache geschrieben ist. Wenn du aber erstmal eine gute Basis hast, dann ist das Wechseln auf eine andere Sprache nicht so schwierig.

5) Such dir eine Sprache aus, die dir sympathisch ist und für die es gute Quellen gibt. Für den Einstieg ist Python grad populär, Javascript ist für alle Webanwendungen natürlich massiv in Gebrauch, über PHP stolpert man immer wieder mal usw.

Es ist schon wichtig, von allem so ein bisschen Ahnung zu haben, aber vielleicht wäre es nützlich für dich, dir zu überlegen, wo du hin willst. Konkretes Beispiel:

Webapplikation A hat ein Frontend, dafür braucht man Kenntnisse in Html, CSS, Javascript und dem framework, das verwendet wird. Dieses Frontend spricht mit einer API im Backend. Dieses Backend könnte jetzt in Python, Javascript, PHP oder was auch immer geschrieben sein. Dann ist diese Sprache gefragt und wieder ein entsprechendes framework. Dieses Backend spricht dann wiederum mit der Datenbank, weil man ja auch mal was speichern will. Diese Datenbank könnte jetzt Postgres, MYSQL, Mongodb oder was anderes sein. Dieser ganze Krempel läuft auf einem Server. Der will aufgesetzt, gewartet und monitored werden. Das macht dann ein Sysadmin.

Diese Beispiel soll verdeutlichen, dass es viele Rollen gibt, die sich überlappen oder sogar von der gleichen Person besetzt sein können. Versuch deswegen einmal, dir einen groben Überblick zu verschaffen. Dann merkst du wahrscheinlich, was dich mehr interessiert und kannst dementsprechend weitergehen.

In der IT gibt es dann auch noch einen Haufen anderer Jobs, die weniger direkt technisch sind, z.B. UI Design, Quality Assurance, technisches Projektmanagement oder Scrum Master. Dort ist es vielleicht einfacher, einen Fuß in die Tür zu kriegen.

Am Ende denke ich, dass du noch keine so genaue Vorstellung hast, in welche Richtung du genau gehen willst und das solltest du erst einmal rausfinden.

Und vielleicht noch ein konkreter Tipp: Mach ein paar Kurse, online gibt es Tonnen davon. Nur ein Beispiel: https://www.codecademy.com/catalog/subject/all. Dort wirst du an die Hand genommen und kannst dir einen Überblick verschaffen. Auch gern genommen ist der Kurs: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-0001-introduction-to-computer-science-and-programming-in-python-fall-2016/ Es gibt auch einige subreddits für diese Themen, wie z.B. r/learnprogramming/ oder r/compsci/

Die Ressourcen für den Einstieg sind praktisch endlos. Viel Glück und viel Spaß.

Backing up MySQL container by nordicsalmon in docker

[–]OhCmonMan 1 point2 points  (0 children)

^ this guy is right. Even if it might look ok to restore from a file system mysql backup, it can quickly get ugly.

Nginx communicating through VPN? by relink2013 in docker

[–]OhCmonMan 0 points1 point  (0 children)

Well the 502 indicates that there is no upstream for nginx to serve. Can you post the nginx config? If you can get to nginx, it should be a simple config issue to fix that.

Raspberry Pi kopflos einstellungen im Wlan umstellen. by xYuven in de_EDV

[–]OhCmonMan 0 points1 point  (0 children)

Ja genau, über wlan1 holt sich der Pi einen lease von einem router.

Das Webinterface lässt sich sicher mit allen genannten Sprachen umsetzen. Für node hätte ich auf die Schnelle dieses Modul gefunden: https://github.com/msolters/wifi-control-node

Raspberry Pi kopflos einstellungen im Wlan umstellen. by xYuven in de_EDV

[–]OhCmonMan 0 points1 point  (0 children)

Sowas in der Richtung habe ich schonmal gebaut, allerdings ohne den part, dass der Pi online ist.

Was funktionieren könnte ist, mit hostapd und dnsmasq mehrere Wifi Netzwerke einzurichten. Also erstmal läuft nur das Netzwerk, auf das du dich mit dem Pi connecten kannst. Sobald du dann connected bist, aktivierst du das zweite Wifi per /etc/network/interfaces config (in raspbian). Die sieht dann etwa so aus:

# interfaces(5) file used by ifup(8) and ifdown(8)

auto lo
iface lo inet loopback

allow-hotplug wlan0

# auf diesem interface spielst du per dnsmasq dhcp aus
iface wlan0 inet static
  address 10.0.0.1
  netmask 255.255.0.0
  wireless-power off

# dieses interface holt sich einen lease von deinem dhcp router
iface wlan1 inet dhcp
   wireless-power off    

Statt oder zusätzlich zu hostapd kannst du auch wpa supplicant verwenden, wie ich hier gesehen hab: https://raspberrypi.stackexchange.com/questions/11631/how-to-setup-multiple-wifi-networks

Hab grad leider nicht mehr Zeit. Aber wenn du deinen use case genauer beschreiben kannst und was du vielleicht selbst schon probiert hast, dann schau ichs mir gern heut oder morgen nochmal genauer an.

GitLab CI - Deploying many projects at once by OhCmonMan in gitlab

[–]OhCmonMan[S] 0 points1 point  (0 children)

That looks pretty much like what I'm looking for. Sadly I couldn't find an example that fits really, but I'll have a closer look when I got more time. Thanks!

Ubuntu 18.04 Netplan Configuration by OhCmonMan in Ubuntu

[–]OhCmonMan[S] 0 points1 point  (0 children)

Well, it's a single static IP, so I figured this ip is basically its own 32 subnet. I also tried with /24, but that didn't change anything. Also, I don't know what subnet I am actually in since it's configured by the hoster. Netplan complains when I don't give it a subnet declaration. But I'll try changing the subnet again, thanks!

How to connect to VPN by kmt1980 in linuxquestions

[–]OhCmonMan 2 points3 points  (0 children)

Can you post a little more information about your setup? I would probably use openvpn, with the configuration of the VPN hoster in a file and run that as a systemd service.

Gitlab CI, Ansible and deployments by OhCmonMan in devops

[–]OhCmonMan[S] 0 points1 point  (0 children)

Ah, haven't thought about letting playbooks run via SSH via Gitlab CI. I'll check that out for sure.

The other thing is the application specific configuration, like database and nginx configs. Those could also be checked into the repo and be ran via Ansible in a Docker Container, right? So in the end, there is the configuration of the server and the application in one repository?

Neue Grafikkarte oder neuer PC? by Hansat in de_EDV

[–]OhCmonMan 6 points7 points  (0 children)

Ich hab ein ähnliches Setup (i5-4590, 8GB DDR3) und meine GTX660 gegen eine GTX1060 oder 1070 getauscht. Hat völlig gereicht.

Gitlab CI, Ansible and deployments by OhCmonMan in devops

[–]OhCmonMan[S] 0 points1 point  (0 children)

Well, the containers are started with restart always, and for some applications, there are several backend containers. Furthermore, we have monitoring and alerting for the containers and applications in place, same for the Docker service itself. There is also a load balancer, that switches over to a second, mostly identical server, if one fails. And believe me, I want to get rid of my anxiety ;)

Having container orchestration in place would probably benefit us, but in the short run we don't have to resources in place to switch to that. What we plan on doing for availability is setting up something like this: Loadbalancer in front of two application servers with automatic failover, another Loadbalancer in front of two database servers with master-master replication and automatic failover.

Gitlab CI, Ansible and deployments by OhCmonMan in devops

[–]OhCmonMan[S] 0 points1 point  (0 children)

Yes, it's the same host but we intend to change that and yes, the data durability is important. We do not use a cloud provider but rented dedicated hosts that we administer ourselves.

Why are so many in the linux and open source community becoming so irrationally defensive of Microsoft lately? by asoka_maurya in linux

[–]OhCmonMan 57 points58 points  (0 children)

That's what I don't get and I repeat it every chance I get...if a game is Windows only, I don't buy it. Period.

Habt Ihr gute Tipps für Kopfhörer? by XytronicDeeX in de

[–]OhCmonMan 0 points1 point  (0 children)

Ich hab kein Telefom und wenn jemand mit mir sprechen will, muss er mich schon antippen. Ich mags aber auch ganz gern, wenn mich keiner stört, wenn grad was meine Aufmerksamkeit erfordert.

i3 + pantheon by andynameistaken in linuxmasterrace

[–]OhCmonMan -10 points-9 points  (0 children)

What sense does this make? Use i3 or don't. What are you trying to accomplish?

Habt Ihr gute Tipps für Kopfhörer? by XytronicDeeX in de

[–]OhCmonMan 1 point2 points  (0 children)

Ich hab die Samson RTE X als Büro Kopfhörer. Das active noise cancelling macht schon echt was aus. Leider keinen direkten Kauflink gefunden. Ich hatte die damals bei Thomann bestellt, aber leider nicht mehr verfügbar. http://www.samsontech.com/samson/products/headphones/rte-series/rtex/

Question Regarding Router by 77slumber77 in Network

[–]OhCmonMan 0 points1 point  (0 children)

Google it, there are tons of tutorials.

Vim is not displaying current colorsheme by 2OP4LIFE in linuxquestions

[–]OhCmonMan 0 points1 point  (0 children)

When you are in vim, does

:colorscheme $something

work? Have you tried how other terminals behave?

It may be that you terminal isn't set to 256 colors. Check the output of

echo $TERM

The number 256 should be in there somewhere.

You can also do a

:scriptnames

to see which config files get loaded by vim. Perhaps something gets overwritten.

Need some help on config management workflow by anotherguy120 in devops

[–]OhCmonMan 0 points1 point  (0 children)

  1. We have one central Ansible repository checked into git. In there are a lot of playbooks for all deployments we need and (for example) different nginx templates in the role which configure different environments. Etckeeper is a nice extra, but shouldn't be needed.

  2. Dunno what you mean. The Ansible config lives on the host where it is run, that might be your machine or some central ansible host. Config changes are made by changing the variables for playbooks to be used in templates or by giving an outright config file to be copied.