RT-PCR is considered the best diagnostic tool. Previous studies have demonstrated the reliability of CNN in classifying classifications, but CNN requires a lot of training data. Meanwhile, at the CT Scan clinic, patients are limited. Therefore, exploration of 2D-CNN settings is proposed to optimize CNN performance on limited data. We compare: (1) activation models, (2) output shapes per layer, (3) dropout layers, and (4) early stopping values. The test results show that RELU activation is better than Sigmoid. Rescaling (128x128) is better for scala (64x64) and (256x256) which affects the output shape model of each layer. In this learning stage, the use of dropouts in the CNN architecture achieves robust accuracy than the architecture that ignores dropouts. The use of 15 early stoppings is better than other values compared. 20 images of pneumonia and 20 images of covid have been tested using the proposed method and achieved 87.50% accuracy, 80.00% precision, 100% recall, and 99.89% F1-Score. Our method is superior to the the comparison method in terms of accuracy, precision, recall, and f1-score, which achieves 85%, 70%, 100%, and 82.35%, respectively.