P
P
PRAIT2018-03-11 07:29:51
Apache HTTP Server
PRAIT, 2018-03-11 07:29:51

Apache in Open Server can't figure out how to do it?

Greetings friends. I apologize in advance for my possible incompetence in this matter, but more than ever I need your help.
There is a site engine, you need to configure the server so that the root directory points to /frontend/www.
And here is an example of the Apache configuration file in the readme of the engine:

<VirtualHost 127.0.0.1:80>
        
<VirtualHost 127.0.0.1:80>
        ServerAdmin [email protected]
        ServerName sitesbars.com
        DocumentRoot /var/www/barsdemo/frontend/www
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory /var/www/barsdemo/frontend/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/error.log
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

For a long time I tried to set up Apache myself but nothing worked. In open server, everything is different. Going to "Advanced - Configuration - Apache 2.4" you can see that this code is written there differently.
<VirtualHost *:%httpsport%>
    DocumentRoot            "%sprogdir%/modules/system/html/default"
    ServerName              "default"
    ServerAlias             "default"
    SSLEngine               on
    #Header always set      Strict-Transport-Security "max-age=94608000"

    #SSLCACertificateFile       ""
    #SSLCertificateChainFile    ""

    SSLCertificateFile      "%sprogdir%/userdata/config/cert_files/server.crt"
    SSLCertificateKeyFile   "%sprogdir%/userdata/config/cert_files/server.key"

    SetEnvIf User-Agent ".*MSIE [1-5].*" \
    nokeepalive ssl-unclean-shutdown \
    downgrade-1.0 force-response-1.0

    SetEnvIf User-Agent ".*MSIE [6-9].*" \
    ssl-unclean-shutdown

    <FilesMatch "\.(cgi|shtml|phtml|php)$">
        SSLOptions          +StdEnvVars
    </FilesMatch>

    <Location /openserver/server-status>

        SetHandler          server-status
        Require             all denied
        Require             ip 127.0.0.0/8 ::1/128
        Require             ip %ips%
        %allow%Require      all granted

    </Location>

    <Location /openserver/server-info>

        SetHandler          server-info
        Require             all denied
        Require             ip 127.0.0.0/8 ::1/128
        Require             ip %ips%
        %allow%Require      all granted

    </Location>
</VirtualHost>

If it's not difficult for you, tell me how to set it up correctly. What to prescribe in " ServerAdmin and ServerName"
Please help me figure out how to set it up, I will be very grateful to you. Thanks in advance to everyone who read to the end!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Moris Haos, 2018-03-11
@morihaos

Hello,
It's simple. Go here:
httpd.apache.org/docs/2.4/mod/core.html#serveradmin
and here
httpd.apache.org/docs/2.4/mod/core.html#servername
read and paste your values.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question