The main question is - is it possible?

suroxon

New Member
Credits
34
Hi guys.

Please don't be angry, I am pretty new in the linux world so I may ask some funny and unusual questions... Sorry in advance for that.

So... I was assigned with some tasks and here they are.

I am working on CentOS 8 distribution and I have two domains, first domain www.mydomain1.com and a second domain www.mydomain2.com, both domains are on the same IP address.

I have just one CentOS 8 server available and on this server I must to install three applications - Wordpress, Jitsi and Nextcloud with Collabora Online module. I already installed Wordpress with a normal install (not using docker) and is normally working on one domain (www.mydomain1.com). I have a plan to install Jitsi and Nextcloud on the same server with a docker, both on a second domain like www.mydomain2.com/nextcloud and www.mydomain2.com/jitsi.

So my question is... Is that possible?

Those tasks are just for the educational purposes so the thing is not permanent and I would do things differently in a normal real world circumstances. ;-)

Thank you for your answers in advance.

Best regards

suroxon
 


Alexzee

Well-Known Member
Credits
5,360
I'm not entirely sure if you can since you only have one ip address.

These links may enlighten you:


HTH
 

f33dm3bits

Gold Member
Gold Supporter
Credits
9,717
Yes that is possible. DNS is just pointing a name to an ip you can point as many domain names to na ip adress as you like. And as for your setup:
www.domain1.com -> wordpress
www.domain2.com/nextcloud
www.domain2.com/jetsi
That should also work also work, although I don't know how jitsi works if it has a web frontend it should work and otherwise they should have documentation on how to make it work.
 

suroxon

New Member
Credits
34
Hi guys.

Thank you for your answers.

I decided I will install Wordpress and Nextcloud on one domain as edusrv55a.domain.com/wordpress and edusrv55a.domain.com/nextcloud and just Jitsi on a second domain (edusrv55b.domain.com) but I have further problem.

I successfully installed Nextcloud which is up and running on edusrv55a.domain.com/nextcloud but I can't install Wordpress on edusrv55a.domain.com/wordpress, it just displays Nextcloud "Internal Server Error".

I tried with different .conf files. Here are current config files for Nextcloud (which is running):

Code:
<VirtualHost *:80>
  DocumentRoot /var/www/nextcloud/
  ServerName  edusrv55a.t-2.com

  Alias /nextcloud "/var/www/nextcloud"

  <Directory /var/www/nextcloud/>
    Require all granted
    AllowOverride All
    Options FollowSymLinks MultiViews

    <IfModule mod_dav.c>
      Dav off
    </IfModule>

  </Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =edusrv55a.t-2.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
And here is config file for Wordpress (I failed with installation):

Code:
<VirtualHost *:80>
  ServerAdmin [email protected]
  ServerName edusrv55a.t-2.com
  ServerAlias www.edusrv55a.t-2.com
  DocumentRoot /var/www/wordpress
  Alias /wordpress "/var/www/wordpress"

<Directory "/var/www/wordpress">
        Options FollowSymLinks MultiViews
        AllowOverride all
        Require all granted
</Directory>

ErrorLog /var/log/httpd/wordpress_error.log
CustomLog /var/log/httpd/wordpress_access.log common
</VirtualHost>
I tried to setup Apache virtual host following this tutorial but I failed.

I have Nextcloud and Wordpress installed under those directories:

/var/www/wordpress/
/var/www/nextcloud/

I added additional directories for virtual hosts:

/etc/httpd/sites-available/
/etc/httpd/sites-enabled/

In those directories are the same .conf files (wordpress.conf , nextcloud.conf) as in /etc/httpd/conf.d/ directory.

What I am doing wrong?

Thank you for your answers in advance guys.

Best regards

suroxon
 

Condobloke

Well-Known Member
Credits
6,784
G'day suroxon and Welcome to linux.org

I cannot help with your topic, although you are in the best of hands with @f33dm3bits and @Alexzee

It is more than admirable that you are willing and able to help yourself, with the two members help

It brings a smile to our faces.
 

Alexzee

Well-Known Member
Credits
5,360
The error log should provide a clue as to what is going on or why it failed.
When you get a chance open the error log and post what it says.

/var/log/httpd/wordpress_error.log

Before installing Apache there are prerequisites that have to be ensured first.:)


Another link for setting up a virtual host on Centos 8:
To test your virtual host, you’ll have to create a phpinfo file to the document root directory.

 

dos2unix

Well-Known Member
Credits
3,030
You can do "name based", or "IP based" or "port based" virtual hosts in Apache.
Simply having two webroot directories won't help.
 

f33dm3bits

Gold Member
Gold Supporter
Credits
9,717
Hi guys.

Thank you for your answers.

I decided I will install Wordpress and Nextcloud on one domain as edusrv55a.domain.com/wordpress and edusrv55a.domain.com/nextcloud and just Jitsi on a second domain (edusrv55b.domain.com) but I have further problem.

I successfully installed Nextcloud which is up and running on edusrv55a.domain.com/nextcloud but I can't install Wordpress on edusrv55a.domain.com/wordpress, it just displays Nextcloud "Internal Server Error".

I tried with different .conf files. Here are current config files for Nextcloud (which is running):

Code:
<VirtualHost *:80>
  DocumentRoot /var/www/nextcloud/
  ServerName  edusrv55a.t-2.com

  Alias /nextcloud "/var/www/nextcloud"

  <Directory /var/www/nextcloud/>
    Require all granted
    AllowOverride All
    Options FollowSymLinks MultiViews

    <IfModule mod_dav.c>
      Dav off
    </IfModule>

  </Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =edusrv55a.t-2.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
And here is config file for Wordpress (I failed with installation):

Code:
<VirtualHost *:80>
  ServerAdmin [email protected]
  ServerName edusrv55a.t-2.com
  ServerAlias www.edusrv55a.t-2.com
  DocumentRoot /var/www/wordpress
  Alias /wordpress "/var/www/wordpress"

<Directory "/var/www/wordpress">
        Options FollowSymLinks MultiViews
        AllowOverride all
        Require all granted
</Directory>

ErrorLog /var/log/httpd/wordpress_error.log
CustomLog /var/log/httpd/wordpress_access.log common
</VirtualHost>
I tried to setup Apache virtual host following this tutorial but I failed.

I have Nextcloud and Wordpress installed under those directories:

/var/www/wordpress/
/var/www/nextcloud/

I added additional directories for virtual hosts:

/etc/httpd/sites-available/
/etc/httpd/sites-enabled/

In those directories are the same .conf files (wordpress.conf , nextcloud.conf) as in /etc/httpd/conf.d/ directory.

What I am doing wrong?

Thank you for your answers in advance guys.

Best regards

suroxon
These are unnecessary:
/etc/httpd/sites-available/
/etc/httpd/sites-enabled/

You can remove the line from httpd.conf: IncludeOptional sites-enabled/*.conf, als well as removing the directories sites-available and sites-enabled. Just place your virtualhosts(wordpress.conf and nextcloud.conf) in /etc/httpd/conf.d and restart apache. If you want to disable one just rename it to nextcloud.conf.disabled or create a directory disabled in /etc/httpd/conf.d/and move the virtualhost there and then restart apache. No need to make things unnecessary complicated for yourself when you first start out, you first have to learn what you are actually are doing before making it complicated. Don't forget your log file settings for your nextcloud virtualhost and that rewrite seems unnecessary, try disabling it by commenting it out so it looks like this
Code:
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =edusrv55a.t-2.com
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
 
Last edited:

KGIII

Well-Known Member
Credits
5,583
Please don't be angry,
I see the others are helping you, and I'll add "learn about nameservers" to the list.

But, I wanted to touch on that comment you made.

It's true, we can be pretty rough on people - but it's generally only when they refuse to help themselves. We get angry when they've given us no information and expect us to provide the solution you think will work rather than something we know will work.

We get angry when they refuse to learn anything.

We get angry when they waste our time, more or less. We're all volunteers and we'd like our time to be used well. We'd like it to be beneficial.

We expect you to have searched, we expect you to know the details, we expect you to cooperate, we expect you to put effort in, and we expect you to help us help you.

Other than that, we're pretty happy and never angry.

Your post is a great one. You gave details, you let us know your objective, you continued helping yourself, etc... So, ain't nobody gonna be angry with you. Each and every one of us was new to Linux at one point in our lives.
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
10,218
Well said :)

@suroxon welcome to linux.org - if you get a chance when your subject here is resolved, consider popping over to Member Introductions and telling us a little of the suroxon story.

I am sure you will get a warm welcome, as we are a pretty friendly community here, I believe.

Cheers

Chris Turner
wizardfromoz
 

Abrahamus

New Member
Credits
13
Hello! This is a very interesting solution, I am also a newbie to Linux and was looking for ways to solve this problem. My friends advised me to get a VPN for more comfortable interaction with the network. At the moment, I found a budget VPN for myself at https://www.vpntesting.com/reviews/nordvpn/, which provides excellent opportunities for maintaining anonymity on the network. I am very afraid of hacking and identity theft and therefore it is very important to me. The primary concern for me is security, so I decided that this is the best solution.
 

Carosone

Member
Credits
247
Hello! This is a very interesting solution, I am also a newbie to Linux and was looking for ways to solve this problem. My friends advised me to get a VPN for more comfortable interaction with the network. At the moment, I found a budget VPN for myself at https://www.vpntesting.com/reviews/nordvpn/, which provides excellent opportunities for maintaining anonymity on the network. I am very afraid of hacking and identity theft and therefore it is very important to me. The primary concern for me is security, so I decided that this is the best solution.
Is good, but only a VPN it's not at all! you must read about the 14 eyes and intro of TOR and fingerprint, over and over!..........
 

f33dm3bits

Gold Member
Gold Supporter
Credits
9,717
How did the topic go from apache virtualhosts to VPN?
 

Condobloke

Well-Known Member
Credits
6,784
where should i go for beginner question server?
There is an orange/yellow icon to the right hand side of that page that looks like.....
Screenshot from 2021-01-03 23-08-34.png


....click on that, and away you go.
Give it a title, and type away
 

Members online


Top