Answer the question
In order to leave comments, you need to log in
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>
Answer the question
In order to leave comments, you need to log in
Add sites through the Vesta panel itself, the same goes for the configuration.
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.
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?
int* ptr = nullptr;
...
InitArray(ptr, size);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question