Nikita Panormov
Nikita Panormov

Reputation: 1

Deploy Admin panel for my site on the same IP using Apache 2

I'm a newbie in deploying apps using Apache. Not so long ago I've deployed vue.js using very simple tutorial configuration and then I tried to deploy strapi admin panel on the same VDS using same IP. So I am faced with a couple of troubles:

  1. I don't know how to modify my configuration to deploy admin panel with my site correctly.

here is my config:

<VirtualHost 188.***.**.***:80>
    ServerName my-site.com
    ServerAlias www.my-site.com
    ServerAdmin [email protected]
    DocumentRoot /var/www/mySite/public_html

<Directory /var/www/mySite/public_html>
    AllowOverride All
    Require all granted
    </Directory>

    ErrorLog /var/www/mySite/error.log
    CustomLog /var/www/mySite/access.log combined
</VirtualHost>

I've rented VDS on hosting service and they gave to me technical hostname which is connected with my server IP and this makes me puzzled, because I have to configure Server name and Server Alias in my site conf. Is these parameters will be visible in internet or in domain name system?

maybe I'm asking stupid questions but after a week of deep-sitting in documentation I didn't find clear answer.

Upvotes: -2

Views: 233

Answers (1)

Nikita Panormov
Nikita Panormov

Reputation: 1

Well, i found an answer. If you faced with the same problem. To deploy another site on your apache server you should add another Virtual host directive in your conf file (example in question), then when you try to set Server name or Server Alias - you should write your website domain. Just look at apache as phone list for all websites of your server. Domain names is always connected with some ip address so when you write down web site url DNS looking for ip address wich is connected with domain you wrote, and after that apache - wich works on server try to compare your domain with domain in confs - if it find equals it will throw back to you webpage if not it throw to you first deployed site (first Virtual Host to say simple). Lets come back to the main topic. if you want to have two sites on your VDS - you have to have two domains in that case it is very easy to deploy two sites on the one server with one ip. i hope my answer will be useful for newbies. And i really sorry for my english.

Upvotes: 0

Related Questions