Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
39d6348
apache: A basic httpd-server has been created
NF-coder Sep 6, 2025
8d6831b
fix: comments on the same line as the apache instructions caused crit…
NF-coder Sep 6, 2025
2c87675
apache: now /index.html redirecting to /
NF-coder Sep 6, 2025
d68cc5f
Merge pull request #1 from NF-itmo/basic-httpd-server
NF-coder Sep 6, 2025
8079365
CI: add Super-Linter - linter for multiple languages
NF-coder Sep 6, 2025
fb3b194
fix (CI): I forgot to pass GITHUB_TOKEN as environment var to Super-L…
NF-coder Sep 6, 2025
a300168
java-fcgi: A basic FastCGI server has been created
NF-coder Sep 7, 2025
20e0cf1
java-fcgi (CD): now server jarfile builds and runs inside docker cont…
NF-coder Sep 7, 2025
c96362d
fix (java-fcgi): I forgot to pass FastCGI server port to jar
NF-coder Sep 7, 2025
169d0ef
apache: now apache wired with java FastCI server
NF-coder Sep 7, 2025
e317d9f
fix (java-fcgi): fcgi json responce was building with syntax errors
NF-coder Sep 7, 2025
2ede792
Update TODO for Java FCGI
NF-coder Sep 7, 2025
ddfd3dd
Merge pull request #2 from NF-itmo/basic-java-fcgi
NF-coder Sep 7, 2025
3272aad
Fix typo in TODO list
NF-coder Sep 7, 2025
110e8d5
static: frontend-stub now ready to use
NF-coder Sep 8, 2025
b4cc2f3
static: created simle function for AJAX requests sending
NF-coder Sep 8, 2025
f42a307
fix (java-fcgi): now browser understands that server reurned json, no…
NF-coder Sep 9, 2025
5ffa111
fix (java-fcgi): removed unused enum option
NF-coder Sep 9, 2025
aeb8dc1
java-fcgi-timer: nanosecond timer added
NF-coder Sep 9, 2025
95a88b4
Merge pull request #3 from NF-itmo/java-fcgi-timer
NF-coder Sep 9, 2025
f5914ba
Fix typo in linter.yaml
NF-coder Sep 9, 2025
2b2589b
Merge pull request #4 from NF-itmo/static-dev
NF-coder Sep 9, 2025
892142c
integration: now java-fcgi server and fronted can communicate via AJAX
NF-coder Sep 9, 2025
cc60b83
fix (static): fixed multiple bugs with svg graph
NF-coder Sep 9, 2025
e407c7a
Merge pull request #5 from NF-itmo/static-and-java-fcgi-integration
NF-coder Sep 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on:
push:
branches: [ "dev", "main" ]
pull_request:
branches: [ "dev", "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

# Super-linter is a ready-to-run collection of linters and code analyzers, to help validate your source code
- name: Super-Linter
uses: super-linter/super-linter@v7.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
10 changes: 10 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# WebProgramming lab work №1
# WebProgramming lab work №1

## TODOs

### Apache httpd
- [ ] Enable logging to APACHE_LOG_DIR (this folder is currently being created during build process, but not used by apache server)
- [X] Redirecting from /index.html to /
- [ ] https support

### Java FCGI
- [ ] User input validation
- [ ] Add support of responces with information about errors
26 changes: 26 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
apache-httpd:
container_name: httpd-server
build:
context: ./httpd/
args:
- APACHE_LOG_DIR="/var/log/httpd-server/"
restart: on-failure
ports:
- "8080:80"
networks:
- internal_net

java-fastcgi:
container_name: fastcgi-server
build:
context: ./server/
restart: on-failure
depends_on:
- apache-httpd
networks:
- internal_net

networks:
internal_net:
driver: bridge
19 changes: 19 additions & 0 deletions httpd/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM httpd:2.4-alpine

# create staticfiles directory
RUN mkdir -p /var/www/localhost/htdocs
COPY ./static/ /var/www/localhost/htdocs/static/

# add custom apache configs
RUN mkdir -p /etc/apache2/conf-custom
COPY ./conf/custom/ /etc/apache2/conf-custom/

# create logs directory (temporary disabled)
ARG APACHE_LOG_DIR
RUN mkdir -p ${APACHE_LOG_DIR}
RUN chown www-data:www-data ${APACHE_LOG_DIR}

# setup main apache configuration
COPY ./conf/httpd.conf /usr/local/apache2/conf/httpd.conf

EXPOSE 80
32 changes: 32 additions & 0 deletions httpd/conf/custom/apache-httpd-lab1.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<VirtualHost *:80>
ServerAdmin reshes@rambler.ru
DocumentRoot /var/www/localhost/htdocs/static/

<Directory "/">
# do NOT generate index.html if it doesn't present
Options -Indexes

# Allows usage of some instructions in .htaccess
# AuthConfig - allows set custom Require
# FileInfo - allows set custom Redirect and RewriteRule
AllowOverride AuthConfig FileInfo
</Directory>

# ==========================
# FastCGI server setup start
# ==========================

ProxyPass /fcgi-bin/ fcgi://fastcgi-server:55555/
ProxyPassReverse /fcgi-bin/ fcgi://fastcgi-server:55555/

<Location "/fcgi-bin/">
Require all granted
</Location>

# ==========================
# FastCGI server setup end
# ==========================

# ErrorLog /var/log/httpd-server/error.log
# CustomLog /var/log/httpd-server/access.log combined
</VirtualHost>
Loading