A
A
Alexander2017-01-12 14:47:13
symfony
Alexander, 2017-01-12 14:47:13

Can't host a website on VPS (debian+vestacp+apache)?

I put a clean image on the digital ocean (debian8 * 64)
immediately put the vesta socket with the apache + nginx config

<VirtualHost **.***.***.***:8080>
    ServerName mydomain.com
    ServerAlias www.mydomain.com
    ServerAdmin [email protected]
    DocumentRoot /home/admin/web/mydomain.com/public_html/web
    ScriptAlias /cgi-bin/ /home/admin/web/mydomain.com/cgi-bin/
    Alias /vstats/ /home/admin/web/mydomain.com/stats/
    Alias /error/ /home/admin/web/mydomain.com/document_errors/
    #SuexecUserGroup admin admin
    CustomLog /var/log/apache2/domains/mydomain.com.bytes bytes
    CustomLog /var/log/apache2/domains/mydomain.com.log combined
    ErrorLog /var/log/apache2/domains/mydomain.com.error.log
    <Directory /home/admin/web/mydomain.com/public_html/web>
        AllowOverride None
        Order Allow,Deny
        Allow from All

        <IfModule mod_rewrite.c>
            Options -MultiViews
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*)$ app.php [QSA,L]
        </IfModule>
        php_admin_value open_basedir /home/admin/web/mydomain.com/public_html:/home/admin/tmp
        php_admin_value upload_tmp_dir /home/admin/tmp
        php_admin_value session.save_path /home/admin/tmp
    </Directory>
    <Directory /home/admin/web/mydomain.com/stats>
        AllowOverride All
    </Directory>

    <IfModule mod_ruid2.c>
        RMode config
        RUidGid admin admin
        RGroups www-data
    </IfModule>
    <IfModule itk.c>
        AssignUserID admin admin
    </IfModule>

        <IfModule dir_module>
                DirectoryIndex app.php
        </IfModule>

    IncludeOptional /home/admin/conf/web/apache2.mydomain.com.conf*
</VirtualHost>

500 error
[autoindex:error] [pid 8024] [client 198.148.27.26:40888] AH01276: Cannot serve directory /home/admin/web/mydomain.com/public_html/: No matching DirectoryIndex (index.html,index.cgi
, index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Z
zooks, 2017-01-12
@zooks

Add sites through the Vesta panel itself, the same goes for the configuration.

R
Rsa97, 2017-07-04
@Rsa97

Memory for the ptr array is not allocated at the beginning of the program, so there will be a memory access error in InitArray().
Incomplete condition at the beginning of the Function1() function - the option when index+del > size. The rest of the Function1() function must be completely rewritten, the whole logic of work is incorrect.

D
devalone, 2017-07-04
@devalone

Why don't you allocate memory? What should your functions work with? Very original UB, will fall in a very very rare case. "+1" is not needed here.
This is not clear at all. Why links? And why are you walking through someone else's memory inside the function?

M
Maxim Moseychuk, 2017-07-04
@fshp

int* ptr = nullptr;
...
InitArray(ptr, size);

Your pointer is initialized to zero. He points to nowhere.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question