is it safe to replace wine by vinegar, rice vinegar or apple cider to do a homemade Salami?
Not all salami recipes call for wine. I would advise finding one that doesn't include wine, rather than trying to adapt one that does: modifications to cured meat recipes are risky and potentially unsafe. Although replacing wine with vinegar sounds intuitively safe (in that it lowers the pH), it might have the effect of messing up the initial bacterial culture you're looking for.
If you can find non-alcoholic wine (assuming the alcohol is what you're worried about), it should be fine to substitute that in. The alcohol level is quite low in the mixture as a whole, and doesn't serve any purpose.